From 3a29ae211d7c3c8034d536ea1836b17847f1c95a Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 31 Oct 2023 19:39:48 +0000 Subject: [PATCH] CodeGen from PR 26142 in Azure/azure-rest-api-specs Merge 358648e5eda7182d06a7a794717bfa03eb1a4af9 into b36917f41f60c046b9dfd65b7fd73c608494cd75 --- .../Sample_AppAttachPackageCollection.cs | 246 +++++++ .../Sample_AppAttachPackageResource.cs | 145 ++++ .../Samples/Sample_HostPoolCollection.cs | 10 +- ...PoolPrivateEndpointConnectionCollection.cs | 10 +- ...stPoolPrivateEndpointConnectionResource.cs | 6 +- .../Samples/Sample_HostPoolResource.cs | 57 +- .../Samples/Sample_MsixPackageCollection.cs | 10 +- .../Samples/Sample_MsixPackageResource.cs | 6 +- .../Samples/Sample_ScalingPlanCollection.cs | 10 +- ...e_ScalingPlanPersonalScheduleCollection.cs | 10 +- ...ple_ScalingPlanPersonalScheduleResource.cs | 6 +- ...ple_ScalingPlanPooledScheduleCollection.cs | 10 +- ...ample_ScalingPlanPooledScheduleResource.cs | 6 +- .../Samples/Sample_ScalingPlanResource.cs | 8 +- .../Samples/Sample_SessionHostCollection.cs | 8 +- .../Samples/Sample_SessionHostResource.cs | 6 +- .../Samples/Sample_UserSessionCollection.cs | 8 +- .../Samples/Sample_UserSessionResource.cs | 8 +- .../Sample_VirtualApplicationCollection.cs | 10 +- ...ample_VirtualApplicationGroupCollection.cs | 10 +- .../Sample_VirtualApplicationGroupResource.cs | 10 +- .../Sample_VirtualApplicationResource.cs | 6 +- .../Sample_VirtualDesktopCollection.cs | 8 +- .../Samples/Sample_VirtualDesktopResource.cs | 4 +- .../Sample_VirtualWorkspaceCollection.cs | 10 +- .../Sample_VirtualWorkspaceResource.cs | 10 +- ...pacePrivateEndpointConnectionCollection.cs | 10 +- ...kspacePrivateEndpointConnectionResource.cs | 6 +- .../Generated/AppAttachPackageCollection.cs | 418 +++++++++++ .../src/Generated/AppAttachPackageData.cs | 74 ++ .../src/Generated/AppAttachPackageResource.cs | 604 ++++++++++++++++ .../ArmDesktopVirtualizationModelFactory.cs | 63 +- .../DesktopVirtualizationExtensions.cs | 119 ++++ .../ResourceGroupResourceExtensionClient.cs | 7 + .../SubscriptionResourceExtensionClient.cs | 50 ++ .../src/Generated/HostPoolData.cs | 7 +- .../src/Generated/HostPoolResource.cs | 56 ++ .../Models/AppAttachPackageArchitecture.cs | 66 ++ .../AppAttachPackageData.Serialization.cs | 188 +++++ ...tachPackageInfoProperties.Serialization.cs | 307 ++++++++ .../Models/AppAttachPackageInfoProperties.cs | 94 +++ .../AppAttachPackageList.Serialization.cs | 50 ++ .../Generated/Models/AppAttachPackageList.cs | 37 + .../AppAttachPackagePatch.Serialization.cs | 104 +++ .../Generated/Models/AppAttachPackagePatch.cs | 41 ++ ...achPackagePatchProperties.Serialization.cs | 100 +++ .../Models/AppAttachPackagePatchProperties.cs | 44 ++ ...ppAttachPackageProperties.Serialization.cs | 110 +++ .../Models/AppAttachPackageProperties.cs | 48 ++ .../Models/ExpandMsixImage.Serialization.cs | 48 +- .../src/Generated/Models/ExpandMsixImage.cs | 10 +- .../Models/FailHealthCheckOnStagingFailure.cs | 54 ++ .../Models/HostPoolData.Serialization.cs | 17 +- .../ImportPackageInfoContent.Serialization.cs | 38 + .../Models/ImportPackageInfoContent.cs | 23 + .../Generated/Models/PackageTimestamped.cs | 51 ++ .../src/Generated/Models/ProvisioningState.cs | 57 ++ .../AppAttachPackageInfoRestOperations.cs | 207 ++++++ .../AppAttachPackageRestOperations.cs | 668 ++++++++++++++++++ .../ApplicationGroupsRestOperations.cs | 2 +- .../ApplicationsRestOperations.cs | 2 +- .../RestOperations/DesktopsRestOperations.cs | 2 +- .../RestOperations/HostPoolsRestOperations.cs | 2 +- .../MsixImagesRestOperations.cs | 2 +- .../MsixPackagesRestOperations.cs | 2 +- ...rivateEndpointConnectionsRestOperations.cs | 2 +- .../PrivateLinkResourcesRestOperations.cs | 2 +- ...lingPlanPersonalSchedulesRestOperations.cs | 2 +- ...calingPlanPooledSchedulesRestOperations.cs | 2 +- .../ScalingPlansRestOperations.cs | 2 +- .../SessionHostsRestOperations.cs | 2 +- .../StartMenuItemsRestOperations.cs | 2 +- .../UserSessionsRestOperations.cs | 2 +- .../WorkspacesRestOperations.cs | 2 +- .../src/autorest.md | 2 +- 75 files changed, 4310 insertions(+), 136 deletions(-) create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_AppAttachPackageCollection.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_AppAttachPackageResource.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageCollection.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageData.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageResource.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageArchitecture.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageData.Serialization.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageInfoProperties.Serialization.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageInfoProperties.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageList.Serialization.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageList.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.Serialization.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.Serialization.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.Serialization.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/FailHealthCheckOnStagingFailure.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ImportPackageInfoContent.Serialization.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ImportPackageInfoContent.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/PackageTimestamped.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ProvisioningState.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/AppAttachPackageInfoRestOperations.cs create mode 100644 sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/AppAttachPackageRestOperations.cs diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_AppAttachPackageCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_AppAttachPackageCollection.cs new file mode 100644 index 000000000000..d0bb4f4655c3 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_AppAttachPackageCollection.cs @@ -0,0 +1,246 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.DesktopVirtualization; +using Azure.ResourceManager.DesktopVirtualization.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DesktopVirtualization.Samples +{ + public partial class Sample_AppAttachPackageCollection + { + // AppAttachPackage_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_AppAttachPackageGet() + { + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/AppAttachPackage_Get.json + // this example is just showing the usage of "AppAttachPackage_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "daefabc0-95b4-48b3-b645-8a753a63c4fa"; + string resourceGroupName = "resourceGroup1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppAttachPackageResource + AppAttachPackageCollection collection = resourceGroupResource.GetAppAttachPackages(); + + // invoke the operation + string appAttachPackageName = "packagefullname"; + AppAttachPackageResource result = await collection.GetAsync(appAttachPackageName); + + // 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 + AppAttachPackageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // AppAttachPackage_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_AppAttachPackageGet() + { + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/AppAttachPackage_Get.json + // this example is just showing the usage of "AppAttachPackage_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "daefabc0-95b4-48b3-b645-8a753a63c4fa"; + string resourceGroupName = "resourceGroup1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppAttachPackageResource + AppAttachPackageCollection collection = resourceGroupResource.GetAppAttachPackages(); + + // invoke the operation + string appAttachPackageName = "packagefullname"; + bool result = await collection.ExistsAsync(appAttachPackageName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // AppAttachPackage_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_AppAttachPackageGet() + { + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/AppAttachPackage_Get.json + // this example is just showing the usage of "AppAttachPackage_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "daefabc0-95b4-48b3-b645-8a753a63c4fa"; + string resourceGroupName = "resourceGroup1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppAttachPackageResource + AppAttachPackageCollection collection = resourceGroupResource.GetAppAttachPackages(); + + // invoke the operation + string appAttachPackageName = "packagefullname"; + NullableResponse response = await collection.GetIfExistsAsync(appAttachPackageName); + AppAttachPackageResource 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 + AppAttachPackageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // AppAttachPackage_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_AppAttachPackageCreate() + { + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/AppAttachPackage_Create.json + // this example is just showing the usage of "AppAttachPackage_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "daefabc0-95b4-48b3-b645-8a753a63c4fa"; + string resourceGroupName = "resourceGroup1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppAttachPackageResource + AppAttachPackageCollection collection = resourceGroupResource.GetAppAttachPackages(); + + // invoke the operation + string appAttachPackageName = "msixpackagefullname"; + AppAttachPackageData data = new AppAttachPackageData(new AzureLocation("southcentralus"), new AppAttachPackageProperties() + { + Image = new AppAttachPackageInfoProperties() + { + PackageAlias = "msixpackagealias", + ImagePath = "imagepath", + PackageName = "MsixPackageName", + PackageFamilyName = "MsixPackage_FamilyName", + PackageFullName = "MsixPackage_FullName", + DisplayName = "displayname", + PackageRelativePath = "packagerelativepath", + IsRegularRegistration = false, + IsActive = false, + PackageDependencies = +{ +new MsixPackageDependencies() +{ +DependencyName = "MsixPackage_Dependency_Name", +Publisher = "MsixPackage_Dependency_Publisher", +MinVersion = "packageDep_version", +} +}, + Version = "packageversion", + LastUpdated = DateTimeOffset.Parse("2008-09-22T14:01:54.9571247Z"), + PackageApplications = +{ +new MsixPackageApplications() +{ +AppId = "AppId", +Description = "PackageApplicationDescription", +AppUserModelId = "AppUserModelId", +FriendlyName = "FriendlyName", +IconImageName = "Iconimagename", +RawIcon = BinaryData.FromString("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), +RawPng = BinaryData.FromString("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo"), +} +}, + CertificateName = "certName", + CertificateExpiry = DateTimeOffset.Parse("2023-01-02T17:18:19.1234567Z"), + }, + HostPoolReferences = +{ +}, + KeyVaultURL = "", + FailHealthCheckOnStagingFailure = FailHealthCheckOnStagingFailure.NeedsAssistance, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, appAttachPackageName, data); + AppAttachPackageResource 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 + AppAttachPackageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // AppAttachPackage_ListByResourceGroup + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_AppAttachPackageListByResourceGroup() + { + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/AppAttachPackage_ListByResourceGroup.json + // this example is just showing the usage of "AppAttachPackage_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "daefabc0-95b4-48b3-b645-8a753a63c4fa"; + string resourceGroupName = "resourceGroup1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppAttachPackageResource + AppAttachPackageCollection collection = resourceGroupResource.GetAppAttachPackages(); + + // invoke the operation and iterate over the result + string filter = "HostPoolName eq 'hostpool1'"; + await foreach (AppAttachPackageResource item in collection.GetAllAsync(filter: filter)) + { + // 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 + AppAttachPackageData 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/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_AppAttachPackageResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_AppAttachPackageResource.cs new file mode 100644 index 000000000000..1e1df0d6af40 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_AppAttachPackageResource.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.DesktopVirtualization; +using Azure.ResourceManager.DesktopVirtualization.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DesktopVirtualization.Samples +{ + public partial class Sample_AppAttachPackageResource + { + // AppAttachPackage_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_AppAttachPackageGet() + { + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/AppAttachPackage_Get.json + // this example is just showing the usage of "AppAttachPackage_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 AppAttachPackageResource created on azure + // for more information of creating AppAttachPackageResource, please refer to the document of AppAttachPackageResource + string subscriptionId = "daefabc0-95b4-48b3-b645-8a753a63c4fa"; + string resourceGroupName = "resourceGroup1"; + string appAttachPackageName = "packagefullname"; + ResourceIdentifier appAttachPackageResourceId = AppAttachPackageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, appAttachPackageName); + AppAttachPackageResource appAttachPackage = client.GetAppAttachPackageResource(appAttachPackageResourceId); + + // invoke the operation + AppAttachPackageResource result = await appAttachPackage.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 + AppAttachPackageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // AppAttachPackage_Delete + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_AppAttachPackageDelete() + { + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/AppAttachPackage_Delete.json + // this example is just showing the usage of "AppAttachPackage_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 AppAttachPackageResource created on azure + // for more information of creating AppAttachPackageResource, please refer to the document of AppAttachPackageResource + string subscriptionId = "daefabc0-95b4-48b3-b645-8a753a63c4fa"; + string resourceGroupName = "resourceGroup1"; + string appAttachPackageName = "packagefullname"; + ResourceIdentifier appAttachPackageResourceId = AppAttachPackageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, appAttachPackageName); + AppAttachPackageResource appAttachPackage = client.GetAppAttachPackageResource(appAttachPackageResourceId); + + // invoke the operation + await appAttachPackage.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // AppAttachPackage_Update + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_AppAttachPackageUpdate() + { + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/AppAttachPackage_Update.json + // this example is just showing the usage of "AppAttachPackage_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 AppAttachPackageResource created on azure + // for more information of creating AppAttachPackageResource, please refer to the document of AppAttachPackageResource + string subscriptionId = "daefabc0-95b4-48b3-b645-8a753a63c4fa"; + string resourceGroupName = "resourceGroup1"; + string appAttachPackageName = "msixpackagefullname"; + ResourceIdentifier appAttachPackageResourceId = AppAttachPackageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, appAttachPackageName); + AppAttachPackageResource appAttachPackage = client.GetAppAttachPackageResource(appAttachPackageResourceId); + + // invoke the operation + AppAttachPackagePatch patch = new AppAttachPackagePatch(); + AppAttachPackageResource result = await appAttachPackage.UpdateAsync(patch); + + // 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 + AppAttachPackageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // AppAttachPackage_ListBySubscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAppAttachPackages_AppAttachPackageListBySubscription() + { + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/AppAttachPackage_ListBySubscription.json + // this example is just showing the usage of "AppAttachPackage_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "daefabc0-95b4-48b3-b645-8a753a63c4fa"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + string filter = "HostPoolName eq 'hostpool1'"; + await foreach (AppAttachPackageResource item in subscriptionResource.GetAppAttachPackagesAsync(filter: filter)) + { + // 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 + AppAttachPackageData 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/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolCollection.cs index 92442243abbe..2a3a4a82c200 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolCollection.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_HostPoolCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_HostPoolGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_Get.json // this example is just showing the usage of "HostPools_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 @@ -58,7 +58,7 @@ public async Task Get_HostPoolGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_HostPoolGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_Get.json // this example is just showing the usage of "HostPools_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 @@ -88,7 +88,7 @@ public async Task Exists_HostPoolGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_HostPoolGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_Get.json // this example is just showing the usage of "HostPools_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 @@ -130,7 +130,7 @@ public async Task GetIfExists_HostPoolGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_HostPoolCreate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Create.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_Create.json // this example is just showing the usage of "HostPools_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 @@ -207,7 +207,7 @@ public async Task CreateOrUpdate_HostPoolCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_HostPoolListByResourceGroup() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_ListByResourceGroup.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_ListByResourceGroup.json // this example is just showing the usage of "HostPools_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolPrivateEndpointConnectionCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolPrivateEndpointConnectionCollection.cs index ca4d7cf4d269..5a24ba31f0cf 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolPrivateEndpointConnectionCollection.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolPrivateEndpointConnectionCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_HostPoolPrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_PrivateEndpointConnectionListByHostPool() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_ListByHostPool.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_ListByHostPool.json // this example is just showing the usage of "PrivateEndpointConnections_ListByHostPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_PrivateEndpointConnectionListByHostPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PrivateEndpointConnectionGetByHostPool() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByHostPool.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_GetByHostPool.json // this example is just showing the usage of "PrivateEndpointConnections_GetByHostPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_PrivateEndpointConnectionGetByHostPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_PrivateEndpointConnectionGetByHostPool() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByHostPool.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_GetByHostPool.json // this example is just showing the usage of "PrivateEndpointConnections_GetByHostPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_PrivateEndpointConnectionGetByHostPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_PrivateEndpointConnectionGetByHostPool() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByHostPool.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_GetByHostPool.json // this example is just showing the usage of "PrivateEndpointConnections_GetByHostPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_PrivateEndpointConnectionGetByHostPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PrivateEndpointConnectionUpdateByHostPool() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_UpdateByHostPool.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_UpdateByHostPool.json // this example is just showing the usage of "PrivateEndpointConnections_UpdateByHostPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolPrivateEndpointConnectionResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolPrivateEndpointConnectionResource.cs index 920b20dd9849..324b49da0941 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolPrivateEndpointConnectionResource.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolPrivateEndpointConnectionResource.cs @@ -23,7 +23,7 @@ public partial class Sample_HostPoolPrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PrivateEndpointConnectionGetByHostPool() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByHostPool.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_GetByHostPool.json // this example is just showing the usage of "PrivateEndpointConnections_GetByHostPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_PrivateEndpointConnectionGetByHostPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_PrivateEndpointConnectionDeleteByHostPool() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_DeleteByHostPool.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_DeleteByHostPool.json // this example is just showing the usage of "PrivateEndpointConnections_DeleteByHostPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Delete_PrivateEndpointConnectionDeleteByHostPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PrivateEndpointConnectionUpdateByHostPool() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_UpdateByHostPool.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_UpdateByHostPool.json // this example is just showing the usage of "PrivateEndpointConnections_UpdateByHostPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolResource.cs index 7de7a4127a6b..77c3e3268ef9 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolResource.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_HostPoolResource.cs @@ -24,7 +24,7 @@ public partial class Sample_HostPoolResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResources_PrivateLinkResourcesListByHostPool() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateLinkResources_ListByHostPool.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateLinkResources_ListByHostPool.json // this example is just showing the usage of "PrivateLinkResources_ListByHostPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task GetPrivateLinkResources_PrivateLinkResourcesListByHostPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetScalingPlans_ScalingPlanListByHostPool() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListByHostPool.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_ListByHostPool.json // this example is just showing the usage of "ScalingPlans_ListByHostPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task GetScalingPlans_ScalingPlanListByHostPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_HostPoolGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_Get.json // this example is just showing the usage of "HostPools_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 @@ -122,7 +122,7 @@ public async Task Get_HostPoolGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_HostPoolDelete() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Delete.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_Delete.json // this example is just showing the usage of "HostPools_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 @@ -150,7 +150,7 @@ public async Task Delete_HostPoolDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_HostPoolUpdate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Update.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_Update.json // this example is just showing the usage of "HostPools_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 @@ -224,7 +224,7 @@ public async Task Update_HostPoolUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetHostPools_HostPoolList() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_List.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_List.json // this example is just showing the usage of "HostPools_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -259,7 +259,7 @@ public async Task GetHostPools_HostPoolList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RetrieveRegistrationToken_HostPoolsRetrieveRegistrationTokenPost() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPools_RetrieveRegistrationToken_Post.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPools_RetrieveRegistrationToken_Post.json // this example is just showing the usage of "HostPools_RetrieveRegistrationToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -286,7 +286,7 @@ public async Task RetrieveRegistrationToken_HostPoolsRetrieveRegistrationTokenPo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetUserSessions_UserSessionListByHostPool() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_ListByHostPool.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_ListByHostPool.json // this example is just showing the usage of "UserSessions_ListByHostPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -319,12 +319,51 @@ public async Task GetUserSessions_UserSessionListByHostPool() Console.WriteLine($"Succeeded"); } + // AppAttachPackageInfo_Import + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ImportAppAttachPackageInfos_AppAttachPackageInfoImport() + { + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/AppAttachPackageInfo_Import_Post.json + // this example is just showing the usage of "AppAttachPackageInfo_Import" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 HostPoolResource created on azure + // for more information of creating HostPoolResource, please refer to the document of HostPoolResource + string subscriptionId = "daefabc0-95b4-48b3-b645-8a753a63c4fa"; + string resourceGroupName = "resourceGroup1"; + string hostPoolName = "hostpool1"; + ResourceIdentifier hostPoolResourceId = HostPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, hostPoolName); + HostPoolResource hostPool = client.GetHostPoolResource(hostPoolResourceId); + + // invoke the operation and iterate over the result + ImportPackageInfoContent content = new ImportPackageInfoContent() + { + Path = "imagepath", + PackageArchitecture = AppAttachPackageArchitecture.X64, + }; + await foreach (AppAttachPackageResource item in hostPool.ImportAppAttachPackageInfosAsync(content)) + { + // 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 + AppAttachPackageData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + // MsixImage_Expand [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ExpandMsixImages_MsixImageExpand() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixImage_Expand_Post.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixImage_Expand_Post.json // this example is just showing the usage of "MsixImages_Expand" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_MsixPackageCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_MsixPackageCollection.cs index f2f3b8f84e89..90022a6474ac 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_MsixPackageCollection.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_MsixPackageCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_MsixPackageCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_MSIXPackageGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixPackage_Get.json // this example is just showing the usage of "MSIXPackages_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 @@ -58,7 +58,7 @@ public async Task Get_MSIXPackageGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_MSIXPackageGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixPackage_Get.json // this example is just showing the usage of "MSIXPackages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_MSIXPackageGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_MSIXPackageGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixPackage_Get.json // this example is just showing the usage of "MSIXPackages_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 @@ -132,7 +132,7 @@ public async Task GetIfExists_MSIXPackageGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_MSIXPackageCreate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Create.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixPackage_Create.json // this example is just showing the usage of "MSIXPackages_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 @@ -202,7 +202,7 @@ public async Task CreateOrUpdate_MSIXPackageCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_MSIXPackageList() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_List.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixPackage_List.json // this example is just showing the usage of "MSIXPackages_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 diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_MsixPackageResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_MsixPackageResource.cs index a87c259660b8..c6c1f16f1198 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_MsixPackageResource.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_MsixPackageResource.cs @@ -23,7 +23,7 @@ public partial class Sample_MsixPackageResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_MSIXPackageGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixPackage_Get.json // this example is just showing the usage of "MSIXPackages_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 @@ -55,7 +55,7 @@ public async Task Get_MSIXPackageGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_MSIXPackageDelete() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Delete.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixPackage_Delete.json // this example is just showing the usage of "MSIXPackages_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 @@ -83,7 +83,7 @@ public async Task Delete_MSIXPackageDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_MSIXPackageUpdate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Update.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixPackage_Update.json // this example is just showing the usage of "MSIXPackages_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanCollection.cs index 0b4b22d8e0d5..acaac57b5e7a 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanCollection.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_ScalingPlanCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ScalingPlansGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_Get.json // this example is just showing the usage of "ScalingPlans_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 @@ -58,7 +58,7 @@ public async Task Get_ScalingPlansGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ScalingPlansGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_Get.json // this example is just showing the usage of "ScalingPlans_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 @@ -88,7 +88,7 @@ public async Task Exists_ScalingPlansGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ScalingPlansGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_Get.json // this example is just showing the usage of "ScalingPlans_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 @@ -130,7 +130,7 @@ public async Task GetIfExists_ScalingPlansGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ScalingPlansCreate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Create.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_Create.json // this example is just showing the usage of "ScalingPlans_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task CreateOrUpdate_ScalingPlansCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ScalingPlansListByResourceGroup() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListByResourceGroup.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_ListByResourceGroup.json // this example is just showing the usage of "ScalingPlans_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPersonalScheduleCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPersonalScheduleCollection.cs index 8853d8940e3b..62cda7b8ea21 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPersonalScheduleCollection.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPersonalScheduleCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ScalingPlanPersonalScheduleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ScalingPlanPersonalSchedulesGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Get.json // this example is just showing the usage of "ScalingPlanPersonalSchedules_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 @@ -58,7 +58,7 @@ public async Task Get_ScalingPlanPersonalSchedulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ScalingPlanPersonalSchedulesGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Get.json // this example is just showing the usage of "ScalingPlanPersonalSchedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_ScalingPlanPersonalSchedulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ScalingPlanPersonalSchedulesGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Get.json // this example is just showing the usage of "ScalingPlanPersonalSchedules_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 @@ -132,7 +132,7 @@ public async Task GetIfExists_ScalingPlanPersonalSchedulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ScalingPlanPersonalSchedulesCreate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Create.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Create.json // this example is just showing the usage of "ScalingPlanPersonalSchedules_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -200,7 +200,7 @@ public async Task CreateOrUpdate_ScalingPlanPersonalSchedulesCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ScalingPlanPersonalSchedulesList() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_List.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_List.json // this example is just showing the usage of "ScalingPlanPersonalSchedules_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 diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPersonalScheduleResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPersonalScheduleResource.cs index f2520804ecac..e846897e0501 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPersonalScheduleResource.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPersonalScheduleResource.cs @@ -23,7 +23,7 @@ public partial class Sample_ScalingPlanPersonalScheduleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ScalingPlanPersonalSchedulesGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Get.json // this example is just showing the usage of "ScalingPlanPersonalSchedules_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 @@ -55,7 +55,7 @@ public async Task Get_ScalingPlanPersonalSchedulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ScalingPlanPersonalSchedulesDelete() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Delete.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Delete.json // this example is just showing the usage of "ScalingPlanPersonalSchedules_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 @@ -83,7 +83,7 @@ public async Task Delete_ScalingPlanPersonalSchedulesDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ScalingPlanPersonalSchedulesUpdate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Update.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Update.json // this example is just showing the usage of "ScalingPlanPersonalSchedules_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPooledScheduleCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPooledScheduleCollection.cs index 8d51a4c6ca4e..4e5827ef8ef7 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPooledScheduleCollection.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPooledScheduleCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ScalingPlanPooledScheduleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ScalingPlanPooledSchedulesGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Get.json // this example is just showing the usage of "ScalingPlanPooledSchedules_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 @@ -58,7 +58,7 @@ public async Task Get_ScalingPlanPooledSchedulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ScalingPlanPooledSchedulesGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Get.json // this example is just showing the usage of "ScalingPlanPooledSchedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_ScalingPlanPooledSchedulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ScalingPlanPooledSchedulesGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Get.json // this example is just showing the usage of "ScalingPlanPooledSchedules_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 @@ -132,7 +132,7 @@ public async Task GetIfExists_ScalingPlanPooledSchedulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ScalingPlanPooledSchedulesCreate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Create.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Create.json // this example is just showing the usage of "ScalingPlanPooledSchedules_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -190,7 +190,7 @@ public async Task CreateOrUpdate_ScalingPlanPooledSchedulesCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ScalingPlanPooledSchedulesList() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_List.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_List.json // this example is just showing the usage of "ScalingPlanPooledSchedules_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 diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPooledScheduleResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPooledScheduleResource.cs index 104e13b37a9a..f6e229330915 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPooledScheduleResource.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanPooledScheduleResource.cs @@ -23,7 +23,7 @@ public partial class Sample_ScalingPlanPooledScheduleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ScalingPlanPooledSchedulesGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Get.json // this example is just showing the usage of "ScalingPlanPooledSchedules_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 @@ -55,7 +55,7 @@ public async Task Get_ScalingPlanPooledSchedulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ScalingPlanPooledSchedulesDelete() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Delete.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Delete.json // this example is just showing the usage of "ScalingPlanPooledSchedules_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 @@ -83,7 +83,7 @@ public async Task Delete_ScalingPlanPooledSchedulesDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ScalingPlanPooledSchedulesUpdate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Update.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Update.json // this example is just showing the usage of "ScalingPlanPooledSchedules_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanResource.cs index 6a766b1a49f2..a6c2ac34d1d8 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanResource.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_ScalingPlanResource.cs @@ -24,7 +24,7 @@ public partial class Sample_ScalingPlanResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ScalingPlansGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_Get.json // this example is just showing the usage of "ScalingPlans_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 @@ -55,7 +55,7 @@ public async Task Get_ScalingPlansGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ScalingPlansDelete() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Delete.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_Delete.json // this example is just showing the usage of "ScalingPlans_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Delete_ScalingPlansDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ScalingPlansUpdate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Update.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_Update.json // this example is just showing the usage of "ScalingPlans_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Update_ScalingPlansUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetScalingPlans_ScalingPlansListBySubscription() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListBySubscription.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_ListBySubscription.json // this example is just showing the usage of "ScalingPlans_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_SessionHostCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_SessionHostCollection.cs index 809bd10b020e..a26b08cecf62 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_SessionHostCollection.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_SessionHostCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_SessionHostCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_SessionHostGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/SessionHost_Get.json // this example is just showing the usage of "SessionHosts_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 @@ -57,7 +57,7 @@ public async Task Get_SessionHostGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_SessionHostGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/SessionHost_Get.json // this example is just showing the usage of "SessionHosts_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 @@ -88,7 +88,7 @@ public async Task Exists_SessionHostGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_SessionHostGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/SessionHost_Get.json // this example is just showing the usage of "SessionHosts_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 @@ -131,7 +131,7 @@ public async Task GetIfExists_SessionHostGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_SessionHostList() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_List.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/SessionHost_List.json // this example is just showing the usage of "SessionHosts_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 diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_SessionHostResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_SessionHostResource.cs index e4f270b677ac..c4d209c028ee 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_SessionHostResource.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_SessionHostResource.cs @@ -23,7 +23,7 @@ public partial class Sample_SessionHostResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_SessionHostGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/SessionHost_Get.json // this example is just showing the usage of "SessionHosts_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 @@ -55,7 +55,7 @@ public async Task Get_SessionHostGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_SessionHostDelete() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Delete.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/SessionHost_Delete.json // this example is just showing the usage of "SessionHosts_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 @@ -84,7 +84,7 @@ public async Task Delete_SessionHostDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_SessionHostUpdate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Update.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/SessionHost_Update.json // this example is just showing the usage of "SessionHosts_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_UserSessionCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_UserSessionCollection.cs index b692378f050f..833bf3bd9cb4 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_UserSessionCollection.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_UserSessionCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_UserSessionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_UserSessionGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_Get.json // this example is just showing the usage of "UserSessions_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 @@ -58,7 +58,7 @@ public async Task Get_UserSessionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_UserSessionGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_Get.json // this example is just showing the usage of "UserSessions_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 @@ -90,7 +90,7 @@ public async Task Exists_UserSessionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_UserSessionGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_Get.json // this example is just showing the usage of "UserSessions_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 @@ -134,7 +134,7 @@ public async Task GetIfExists_UserSessionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_UserSessionList() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_List.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_List.json // this example is just showing the usage of "UserSessions_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 diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_UserSessionResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_UserSessionResource.cs index 37abacaca73e..4ac4ef25e53a 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_UserSessionResource.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_UserSessionResource.cs @@ -23,7 +23,7 @@ public partial class Sample_UserSessionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_UserSessionGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_Get.json // this example is just showing the usage of "UserSessions_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 @@ -56,7 +56,7 @@ public async Task Get_UserSessionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_UserSessionDelete() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Delete.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_Delete.json // this example is just showing the usage of "UserSessions_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 @@ -86,7 +86,7 @@ public async Task Delete_UserSessionDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Disconnect_UserSessionDisconnectPost() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Disconnect_Post.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_Disconnect_Post.json // this example is just showing the usage of "UserSessions_Disconnect" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Disconnect_UserSessionDisconnectPost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task SendMessage_UserSessionSendMessagePost() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_SendMessage_Post.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_SendMessage_Post.json // this example is just showing the usage of "UserSessions_SendMessage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationCollection.cs index c1e261111a22..25e356a0eda0 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationCollection.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_VirtualApplicationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApplicationGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_Get.json // this example is just showing the usage of "Applications_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 @@ -58,7 +58,7 @@ public async Task Get_ApplicationGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApplicationGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_Get.json // this example is just showing the usage of "Applications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_ApplicationGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApplicationGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_Get.json // this example is just showing the usage of "Applications_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 @@ -132,7 +132,7 @@ public async Task GetIfExists_ApplicationGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApplicationCreate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Create.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_Create.json // this example is just showing the usage of "Applications_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 @@ -178,7 +178,7 @@ public async Task CreateOrUpdate_ApplicationCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApplicationsList() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_List.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_List.json // this example is just showing the usage of "Applications_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 diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationGroupCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationGroupCollection.cs index 641533b93ae9..55ce44e6cd98 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationGroupCollection.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationGroupCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_VirtualApplicationGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApplicationGroupGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_Get.json // this example is just showing the usage of "ApplicationGroups_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 @@ -58,7 +58,7 @@ public async Task Get_ApplicationGroupGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApplicationGroupGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_Get.json // this example is just showing the usage of "ApplicationGroups_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 @@ -88,7 +88,7 @@ public async Task Exists_ApplicationGroupGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApplicationGroupGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_Get.json // this example is just showing the usage of "ApplicationGroups_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 @@ -130,7 +130,7 @@ public async Task GetIfExists_ApplicationGroupGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApplicationGroupCreate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Create.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_Create.json // this example is just showing the usage of "ApplicationGroups_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 @@ -176,7 +176,7 @@ public async Task CreateOrUpdate_ApplicationGroupCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApplicationGroupListByResourceGroup() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_ListByResourceGroup.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_ListByResourceGroup.json // this example is just showing the usage of "ApplicationGroups_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationGroupResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationGroupResource.cs index d5e9d9e8a262..341333804c47 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationGroupResource.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationGroupResource.cs @@ -24,7 +24,7 @@ public partial class Sample_VirtualApplicationGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApplicationGroupGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_Get.json // this example is just showing the usage of "ApplicationGroups_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 @@ -55,7 +55,7 @@ public async Task Get_ApplicationGroupGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApplicationGroupDelete() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Delete.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_Delete.json // this example is just showing the usage of "ApplicationGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Delete_ApplicationGroupDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApplicationGroupsUpdate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Update.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_Update.json // this example is just showing the usage of "ApplicationGroups_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 @@ -124,7 +124,7 @@ public async Task Update_ApplicationGroupsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualApplicationGroups_ApplicationGroupList() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_ListBySubscription.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_ListBySubscription.json // this example is just showing the usage of "ApplicationGroups_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -157,7 +157,7 @@ public async Task GetVirtualApplicationGroups_ApplicationGroupList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetStartMenuItems_StartMenuItemList() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/StartMenuItem_List.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/StartMenuItem_List.json // this example is just showing the usage of "StartMenuItems_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 diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationResource.cs index 0225c9bc0d21..b8045e7f036a 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationResource.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualApplicationResource.cs @@ -23,7 +23,7 @@ public partial class Sample_VirtualApplicationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApplicationGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_Get.json // this example is just showing the usage of "Applications_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 @@ -55,7 +55,7 @@ public async Task Get_ApplicationGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApplicationDelete() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Delete.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_Delete.json // this example is just showing the usage of "Applications_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 @@ -83,7 +83,7 @@ public async Task Delete_ApplicationDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApplicationUpdate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Update.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_Update.json // this example is just showing the usage of "Applications_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualDesktopCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualDesktopCollection.cs index d1bdca5668f4..1e5c8d63ebac 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualDesktopCollection.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualDesktopCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_VirtualDesktopCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_DesktopGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Desktop_Get.json // this example is just showing the usage of "Desktops_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 @@ -57,7 +57,7 @@ public async Task Get_DesktopGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_DesktopGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Desktop_Get.json // this example is just showing the usage of "Desktops_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 @@ -88,7 +88,7 @@ public async Task Exists_DesktopGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_DesktopGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Desktop_Get.json // this example is just showing the usage of "Desktops_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 @@ -131,7 +131,7 @@ public async Task GetIfExists_DesktopGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_DesktopList() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_List.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Desktop_List.json // this example is just showing the usage of "Desktops_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 diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualDesktopResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualDesktopResource.cs index cae12bbbcfd7..8a4b08699c98 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualDesktopResource.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualDesktopResource.cs @@ -22,7 +22,7 @@ public partial class Sample_VirtualDesktopResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_DesktopGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Desktop_Get.json // this example is just showing the usage of "Desktops_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 @@ -54,7 +54,7 @@ public async Task Get_DesktopGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_DesktopUpdate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Update.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Desktop_Update.json // this example is just showing the usage of "Desktops_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualWorkspaceCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualWorkspaceCollection.cs index 8afb5ed0e879..ee1c46432f56 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualWorkspaceCollection.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualWorkspaceCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_VirtualWorkspaceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_WorkspaceGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_Get.json // this example is just showing the usage of "Workspaces_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 @@ -57,7 +57,7 @@ public async Task Get_WorkspaceGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_WorkspaceGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_Get.json // this example is just showing the usage of "Workspaces_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 @@ -87,7 +87,7 @@ public async Task Exists_WorkspaceGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_WorkspaceGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_Get.json // this example is just showing the usage of "Workspaces_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 @@ -129,7 +129,7 @@ public async Task GetIfExists_WorkspaceGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_WorkspaceCreate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Create.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_Create.json // this example is just showing the usage of "Workspaces_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 @@ -174,7 +174,7 @@ public async Task CreateOrUpdate_WorkspaceCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_WorkspaceListByResourceGroup() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_ListByResourceGroup.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_ListByResourceGroup.json // this example is just showing the usage of "Workspaces_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualWorkspaceResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualWorkspaceResource.cs index 963d910fa680..f3890d6e383e 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualWorkspaceResource.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_VirtualWorkspaceResource.cs @@ -24,7 +24,7 @@ public partial class Sample_VirtualWorkspaceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_WorkspaceGet() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Get.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_Get.json // this example is just showing the usage of "Workspaces_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 @@ -55,7 +55,7 @@ public async Task Get_WorkspaceGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_WorkspaceDelete() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Delete.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_Delete.json // this example is just showing the usage of "Workspaces_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Delete_WorkspaceDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_WorkspaceUpdate() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Update.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_Update.json // this example is just showing the usage of "Workspaces_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 @@ -123,7 +123,7 @@ public async Task Update_WorkspaceUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualWorkspaces_WorkspaceListBySubscription() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_ListBySubscription.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_ListBySubscription.json // this example is just showing the usage of "Workspaces_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -155,7 +155,7 @@ public async Task GetVirtualWorkspaces_WorkspaceListBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResources_PrivateLinkResourcesListByWorkspace() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateLinkResources_ListByWorkspace.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateLinkResources_ListByWorkspace.json // this example is just showing the usage of "PrivateLinkResources_ListByWorkspace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_WorkspacePrivateEndpointConnectionCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_WorkspacePrivateEndpointConnectionCollection.cs index 8ab775229718..2ef9c50212ea 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_WorkspacePrivateEndpointConnectionCollection.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_WorkspacePrivateEndpointConnectionCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_WorkspacePrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_PrivateEndpointConnectionListByWorkspace() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_ListByWorkspace.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_ListByWorkspace.json // this example is just showing the usage of "PrivateEndpointConnections_ListByWorkspace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_PrivateEndpointConnectionListByWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PrivateEndpointConnectionGetByWorkspace() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByWorkspace.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_GetByWorkspace.json // this example is just showing the usage of "PrivateEndpointConnections_GetByWorkspace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_PrivateEndpointConnectionGetByWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_PrivateEndpointConnectionGetByWorkspace() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByWorkspace.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_GetByWorkspace.json // this example is just showing the usage of "PrivateEndpointConnections_GetByWorkspace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_PrivateEndpointConnectionGetByWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_PrivateEndpointConnectionGetByWorkspace() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByWorkspace.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_GetByWorkspace.json // this example is just showing the usage of "PrivateEndpointConnections_GetByWorkspace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_PrivateEndpointConnectionGetByWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PrivateEndpointConnectionUpdateByWorkspace() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_UpdateByWorkspace.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_UpdateByWorkspace.json // this example is just showing the usage of "PrivateEndpointConnections_UpdateByWorkspace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_WorkspacePrivateEndpointConnectionResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_WorkspacePrivateEndpointConnectionResource.cs index 4511e765cb2a..5384c72c939b 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_WorkspacePrivateEndpointConnectionResource.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/samples/Generated/Samples/Sample_WorkspacePrivateEndpointConnectionResource.cs @@ -23,7 +23,7 @@ public partial class Sample_WorkspacePrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PrivateEndpointConnectionGetByWorkspace() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByWorkspace.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_GetByWorkspace.json // this example is just showing the usage of "PrivateEndpointConnections_GetByWorkspace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_PrivateEndpointConnectionGetByWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_PrivateEndpointConnectionDeleteByWorkspace() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_DeleteByWorkspace.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_DeleteByWorkspace.json // this example is just showing the usage of "PrivateEndpointConnections_DeleteByWorkspace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Delete_PrivateEndpointConnectionDeleteByWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PrivateEndpointConnectionUpdateByWorkspace() { - // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_UpdateByWorkspace.json + // Generated from example definition: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_UpdateByWorkspace.json // this example is just showing the usage of "PrivateEndpointConnections_UpdateByWorkspace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageCollection.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageCollection.cs new file mode 100644 index 000000000000..daf05ac9fedf --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageCollection.cs @@ -0,0 +1,418 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DesktopVirtualization +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAppAttachPackages method from an instance of . + /// + public partial class AppAttachPackageCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _appAttachPackageClientDiagnostics; + private readonly AppAttachPackageRestOperations _appAttachPackageRestClient; + + /// Initializes a new instance of the class for mocking. + protected AppAttachPackageCollection() + { + } + + /// 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 AppAttachPackageCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _appAttachPackageClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DesktopVirtualization", AppAttachPackageResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AppAttachPackageResource.ResourceType, out string appAttachPackageApiVersion); + _appAttachPackageRestClient = new AppAttachPackageRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appAttachPackageApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create or update an App Attach package. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_CreateOrUpdate + /// + /// + /// + /// 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 App Attach package arm object. + /// Object containing App Attach Package definitions. + /// 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 appAttachPackageName, AppAttachPackageData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _appAttachPackageRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, appAttachPackageName, data, cancellationToken).ConfigureAwait(false); + var operation = new DesktopVirtualizationArmOperation(Response.FromValue(new AppAttachPackageResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update an App Attach package. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_CreateOrUpdate + /// + /// + /// + /// 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 App Attach package arm object. + /// Object containing App Attach Package definitions. + /// 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 appAttachPackageName, AppAttachPackageData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _appAttachPackageRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, appAttachPackageName, data, cancellationToken); + var operation = new DesktopVirtualizationArmOperation(Response.FromValue(new AppAttachPackageResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get an app attach package. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The name of the App Attach package arm object. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string appAttachPackageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageCollection.Get"); + scope.Start(); + try + { + var response = await _appAttachPackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, appAttachPackageName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AppAttachPackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get an app attach package. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The name of the App Attach package arm object. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string appAttachPackageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageCollection.Get"); + scope.Start(); + try + { + var response = _appAttachPackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, appAttachPackageName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AppAttachPackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List App Attach packages in resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages + /// + /// + /// Operation Id + /// AppAttachPackage_ListByResourceGroup + /// + /// + /// + /// OData filter expression. Valid properties for filtering are package name and host pool. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _appAttachPackageRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _appAttachPackageRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AppAttachPackageResource(Client, AppAttachPackageData.DeserializeAppAttachPackageData(e)), _appAttachPackageClientDiagnostics, Pipeline, "AppAttachPackageCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List App Attach packages in resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages + /// + /// + /// Operation Id + /// AppAttachPackage_ListByResourceGroup + /// + /// + /// + /// OData filter expression. Valid properties for filtering are package name and host pool. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _appAttachPackageRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _appAttachPackageRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AppAttachPackageResource(Client, AppAttachPackageData.DeserializeAppAttachPackageData(e)), _appAttachPackageClientDiagnostics, Pipeline, "AppAttachPackageCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The name of the App Attach package arm object. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string appAttachPackageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageCollection.Exists"); + scope.Start(); + try + { + var response = await _appAttachPackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, appAttachPackageName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The name of the App Attach package arm object. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string appAttachPackageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageCollection.Exists"); + scope.Start(); + try + { + var response = _appAttachPackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, appAttachPackageName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The name of the App Attach package arm object. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string appAttachPackageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _appAttachPackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, appAttachPackageName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AppAttachPackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The name of the App Attach package arm object. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string appAttachPackageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageCollection.GetIfExists"); + scope.Start(); + try + { + var response = _appAttachPackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, appAttachPackageName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AppAttachPackageResource(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/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageData.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageData.cs new file mode 100644 index 000000000000..8b87920d6c0f --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageData.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.ResourceManager.DesktopVirtualization.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DesktopVirtualization +{ + /// + /// A class representing the AppAttachPackage data model. + /// Schema for App Attach Package properties. + /// + public partial class AppAttachPackageData : TrackedResourceData + { + /// Initializes a new instance of AppAttachPackageData. + /// The location. + /// Detailed properties for App Attach Package. + /// is null. + public AppAttachPackageData(AzureLocation location, AppAttachPackageProperties properties) : base(location) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of AppAttachPackageData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Detailed properties for App Attach Package. + /// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. + /// The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Gets or sets the identity. Current supported identity types: SystemAssigned. + /// The resource model definition representing SKU. + /// Gets or sets the plan. + internal AppAttachPackageData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppAttachPackageProperties properties, ResourceIdentifier managedBy, string kind, ETag? etag, ManagedServiceIdentity identity, DesktopVirtualizationSku sku, ArmPlan plan) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ManagedBy = managedBy; + Kind = kind; + ETag = etag; + Identity = identity; + Sku = sku; + Plan = plan; + } + + /// Detailed properties for App Attach Package. + public AppAttachPackageProperties Properties { get; set; } + /// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. + public ResourceIdentifier ManagedBy { get; set; } + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. + public string Kind { get; set; } + /// The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + public ETag? ETag { get; } + /// Gets or sets the identity. Current supported identity types: SystemAssigned. + public ManagedServiceIdentity Identity { get; set; } + /// The resource model definition representing SKU. + public DesktopVirtualizationSku Sku { get; set; } + /// Gets or sets the plan. + public ArmPlan Plan { get; set; } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageResource.cs new file mode 100644 index 000000000000..4a953b3658c0 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageResource.cs @@ -0,0 +1,604 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.DesktopVirtualization.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DesktopVirtualization +{ + /// + /// A Class representing an AppAttachPackage along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAppAttachPackageResource method. + /// Otherwise you can get one from its parent resource using the GetAppAttachPackage method. + /// + public partial class AppAttachPackageResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string appAttachPackageName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _appAttachPackageClientDiagnostics; + private readonly AppAttachPackageRestOperations _appAttachPackageRestClient; + private readonly AppAttachPackageData _data; + + /// Initializes a new instance of the class for mocking. + protected AppAttachPackageResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AppAttachPackageResource(ArmClient client, AppAttachPackageData 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 AppAttachPackageResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _appAttachPackageClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DesktopVirtualization", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string appAttachPackageApiVersion); + _appAttachPackageRestClient = new AppAttachPackageRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appAttachPackageApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DesktopVirtualization/appAttachPackages"; + + /// 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 AppAttachPackageData 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 an app attach package. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.Get"); + scope.Start(); + try + { + var response = await _appAttachPackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AppAttachPackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get an app attach package. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.Get"); + scope.Start(); + try + { + var response = _appAttachPackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AppAttachPackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove an App Attach Package. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Delete + /// + /// + /// + /// 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. + /// Force flag to delete App Attach package. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? force = null, CancellationToken cancellationToken = default) + { + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.Delete"); + scope.Start(); + try + { + var response = await _appAttachPackageRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, force, cancellationToken).ConfigureAwait(false); + var operation = new DesktopVirtualizationArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove an App Attach Package. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Delete + /// + /// + /// + /// 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. + /// Force flag to delete App Attach package. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, CancellationToken cancellationToken = default) + { + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.Delete"); + scope.Start(); + try + { + var response = _appAttachPackageRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, force, cancellationToken); + var operation = new DesktopVirtualizationArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update an App Attach Package + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Update + /// + /// + /// + /// Object containing App Attach Package definition. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(AppAttachPackagePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.Update"); + scope.Start(); + try + { + var response = await _appAttachPackageRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AppAttachPackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update an App Attach Package + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Update + /// + /// + /// + /// Object containing App Attach Package definition. + /// The cancellation token to use. + /// is null. + public virtual Response Update(AppAttachPackagePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.Update"); + scope.Start(); + try + { + var response = _appAttachPackageRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + return Response.FromValue(new AppAttachPackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _appAttachPackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AppAttachPackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new AppAttachPackagePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _appAttachPackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new AppAttachPackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new AppAttachPackagePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _appAttachPackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AppAttachPackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new AppAttachPackagePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _appAttachPackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new AppAttachPackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new AppAttachPackagePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _appAttachPackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AppAttachPackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new AppAttachPackagePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _appAttachPackageClientDiagnostics.CreateScope("AppAttachPackageResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _appAttachPackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new AppAttachPackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new AppAttachPackagePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ArmDesktopVirtualizationModelFactory.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ArmDesktopVirtualizationModelFactory.cs index 7397e7768246..e598760d29d7 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ArmDesktopVirtualizationModelFactory.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ArmDesktopVirtualizationModelFactory.cs @@ -346,6 +346,7 @@ public static VirtualDesktopData VirtualDesktopData(ResourceIdentifier id = null /// The registration info of HostPool. /// VM template for sessionhosts configuration within hostpool. /// List of applicationGroup links. + /// List of App Attach Package links. /// URL to customer ADFS server for signing WVD SSO certificates. /// ClientId for the registered Relying Party used to issue WVD SSO certificates. /// Path to Azure KeyVault storing the secret used for communication to ADFS. @@ -363,13 +364,14 @@ public static VirtualDesktopData VirtualDesktopData(ResourceIdentifier id = null /// The resource model definition representing SKU. /// Gets or sets the plan. /// A new instance for mocking. - public static HostPoolData HostPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string objectId = null, string friendlyName = null, string description = null, HostPoolType hostPoolType = default, PersonalDesktopAssignmentType? personalDesktopAssignmentType = null, string customRdpProperty = null, int? maxSessionLimit = null, HostPoolLoadBalancerType loadBalancerType = default, int? ring = null, bool? isValidationEnvironment = null, HostPoolRegistrationInfo registrationInfo = null, string vmTemplate = null, IEnumerable applicationGroupReferences = null, string ssoAdfsAuthority = null, string ssoClientId = null, string ssoClientSecretKeyVaultPath = null, HostPoolSsoSecretType? ssoSecretType = null, PreferredAppGroupType preferredAppGroupType = default, bool? startVmOnConnect = null, bool? isCloudPCResource = null, HostPoolPublicNetworkAccess? publicNetworkAccess = null, SessionHostAgentUpdateProperties agentUpdate = null, IEnumerable privateEndpointConnections = null, ResourceIdentifier managedBy = null, string kind = null, ETag? etag = null, ManagedServiceIdentity identity = null, DesktopVirtualizationSku sku = null, ArmPlan plan = null) + public static HostPoolData HostPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string objectId = null, string friendlyName = null, string description = null, HostPoolType hostPoolType = default, PersonalDesktopAssignmentType? personalDesktopAssignmentType = null, string customRdpProperty = null, int? maxSessionLimit = null, HostPoolLoadBalancerType loadBalancerType = default, int? ring = null, bool? isValidationEnvironment = null, HostPoolRegistrationInfo registrationInfo = null, string vmTemplate = null, IEnumerable applicationGroupReferences = null, IEnumerable appAttachPackageReferences = null, string ssoAdfsAuthority = null, string ssoClientId = null, string ssoClientSecretKeyVaultPath = null, HostPoolSsoSecretType? ssoSecretType = null, PreferredAppGroupType preferredAppGroupType = default, bool? startVmOnConnect = null, bool? isCloudPCResource = null, HostPoolPublicNetworkAccess? publicNetworkAccess = null, SessionHostAgentUpdateProperties agentUpdate = null, IEnumerable privateEndpointConnections = null, ResourceIdentifier managedBy = null, string kind = null, ETag? etag = null, ManagedServiceIdentity identity = null, DesktopVirtualizationSku sku = null, ArmPlan plan = null) { tags ??= new Dictionary(); applicationGroupReferences ??= new List(); + appAttachPackageReferences ??= new List(); privateEndpointConnections ??= new List(); - return new HostPoolData(id, name, resourceType, systemData, tags, location, objectId, friendlyName, description, hostPoolType, personalDesktopAssignmentType, customRdpProperty, maxSessionLimit, loadBalancerType, ring, isValidationEnvironment, registrationInfo, vmTemplate, applicationGroupReferences?.ToList(), ssoAdfsAuthority, ssoClientId, ssoClientSecretKeyVaultPath, ssoSecretType, preferredAppGroupType, startVmOnConnect, isCloudPCResource, publicNetworkAccess, agentUpdate, privateEndpointConnections?.ToList(), managedBy, kind, etag, identity, sku, plan); + return new HostPoolData(id, name, resourceType, systemData, tags, location, objectId, friendlyName, description, hostPoolType, personalDesktopAssignmentType, customRdpProperty, maxSessionLimit, loadBalancerType, ring, isValidationEnvironment, registrationInfo, vmTemplate, applicationGroupReferences?.ToList(), appAttachPackageReferences?.ToList(), ssoAdfsAuthority, ssoClientId, ssoClientSecretKeyVaultPath, ssoSecretType, preferredAppGroupType, startVmOnConnect, isCloudPCResource, publicNetworkAccess, agentUpdate, privateEndpointConnections?.ToList(), managedBy, kind, etag, identity, sku, plan); } /// Initializes a new instance of HostPoolPatch. @@ -524,6 +526,42 @@ public static MsixPackagePatch MsixPackagePatch(ResourceIdentifier id = null, st return new MsixPackagePatch(id, name, resourceType, systemData, isActive, isRegularRegistration, displayName); } + /// Initializes a new instance of AppAttachPackageData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Detailed properties for App Attach Package. + /// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. + /// The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Gets or sets the identity. Current supported identity types: SystemAssigned. + /// The resource model definition representing SKU. + /// Gets or sets the plan. + /// A new instance for mocking. + public static AppAttachPackageData AppAttachPackageData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppAttachPackageProperties properties = null, ResourceIdentifier managedBy = null, string kind = null, ETag? etag = null, ManagedServiceIdentity identity = null, DesktopVirtualizationSku sku = null, ArmPlan plan = null) + { + tags ??= new Dictionary(); + + return new AppAttachPackageData(id, name, resourceType, systemData, tags, location, properties, managedBy, kind, etag, identity, sku, plan); + } + + /// Initializes a new instance of AppAttachPackageProperties. + /// The provisioning state of the App Attach Package. + /// Detailed properties for App Attach Package. + /// List of Hostpool resource Ids. + /// URL of keyvault location to store certificate. + /// Parameter indicating how the health check should behave if this package fails staging. + /// A new instance for mocking. + public static AppAttachPackageProperties AppAttachPackageProperties(ProvisioningState? provisioningState = null, AppAttachPackageInfoProperties image = null, IEnumerable hostPoolReferences = null, string keyVaultURL = null, FailHealthCheckOnStagingFailure? failHealthCheckOnStagingFailure = null) + { + hostPoolReferences ??= new List(); + + return new AppAttachPackageProperties(provisioningState, image, hostPoolReferences?.ToList(), keyVaultURL, failHealthCheckOnStagingFailure); + } + /// Initializes a new instance of ExpandMsixImage. /// The id. /// The name. @@ -542,13 +580,30 @@ public static MsixPackagePatch MsixPackagePatch(ResourceIdentifier id = null, st /// Package Version found in the appxmanifest.xml. /// Date Package was last updated, found in the appxmanifest.xml. /// List of package applications. + /// Certificate name found in the appxmanifest.xml. + /// Date certificate expires, found in the appxmanifest.xml. /// A new instance for mocking. - public static ExpandMsixImage ExpandMsixImage(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string packageAlias = null, string imagePath = null, string packageName = null, string packageFamilyName = null, string packageFullName = null, string displayName = null, string packageRelativePath = null, bool? isRegularRegistration = null, bool? isActive = null, IEnumerable packageDependencies = null, string version = null, DateTimeOffset? lastUpdatedOn = null, IEnumerable packageApplications = null) + public static ExpandMsixImage ExpandMsixImage(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string packageAlias = null, string imagePath = null, string packageName = null, string packageFamilyName = null, string packageFullName = null, string displayName = null, string packageRelativePath = null, bool? isRegularRegistration = null, bool? isActive = null, IEnumerable packageDependencies = null, string version = null, DateTimeOffset? lastUpdatedOn = null, IEnumerable packageApplications = null, string certificateName = null, DateTimeOffset? certificateExpiry = null) { packageDependencies ??= new List(); packageApplications ??= new List(); - return new ExpandMsixImage(id, name, resourceType, systemData, packageAlias, imagePath, packageName, packageFamilyName, packageFullName, displayName, packageRelativePath, isRegularRegistration, isActive, packageDependencies?.ToList(), version, lastUpdatedOn, packageApplications?.ToList()); + return new ExpandMsixImage(id, name, resourceType, systemData, packageAlias, imagePath, packageName, packageFamilyName, packageFullName, displayName, packageRelativePath, isRegularRegistration, isActive, packageDependencies?.ToList(), version, lastUpdatedOn, packageApplications?.ToList(), certificateName, certificateExpiry); + } + + /// Initializes a new instance of AppAttachPackagePatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// tags to be updated. + /// Detailed properties for App Attach Package. + /// A new instance for mocking. + public static AppAttachPackagePatch AppAttachPackagePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AppAttachPackagePatchProperties properties = null) + { + tags ??= new Dictionary(); + + return new AppAttachPackagePatch(id, name, resourceType, systemData, tags, properties); } } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/DesktopVirtualizationExtensions.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/DesktopVirtualizationExtensions.cs index 40b187319d9c..c3352afdbbfd 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/DesktopVirtualizationExtensions.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/DesktopVirtualizationExtensions.cs @@ -296,6 +296,25 @@ public static MsixPackageResource GetMsixPackageResource(this ArmClient client, } #endregion + #region AppAttachPackageResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static AppAttachPackageResource GetAppAttachPackageResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + AppAttachPackageResource.ValidateResourceId(id); + return new AppAttachPackageResource(client, id); + } + ); + } + #endregion + /// Gets a collection of VirtualWorkspaceResources in the ResourceGroupResource. /// The instance the method will execute against. /// An object representing collection of VirtualWorkspaceResources and their operations over a VirtualWorkspaceResource. @@ -520,6 +539,62 @@ public static Response GetHostPool(this ResourceGroupResource return resourceGroupResource.GetHostPools().Get(hostPoolName, cancellationToken); } + /// Gets a collection of AppAttachPackageResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of AppAttachPackageResources and their operations over a AppAttachPackageResource. + public static AppAttachPackageCollection GetAppAttachPackages(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetAppAttachPackages(); + } + + /// + /// Get an app attach package. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The instance the method will execute against. + /// The name of the App Attach package arm object. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetAppAttachPackageAsync(this ResourceGroupResource resourceGroupResource, string appAttachPackageName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetAppAttachPackages().GetAsync(appAttachPackageName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get an app attach package. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName} + /// + /// + /// Operation Id + /// AppAttachPackage_Get + /// + /// + /// + /// The instance the method will execute against. + /// The name of the App Attach package arm object. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetAppAttachPackage(this ResourceGroupResource resourceGroupResource, string appAttachPackageName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetAppAttachPackages().Get(appAttachPackageName, cancellationToken); + } + /// /// List workspaces in subscription. /// @@ -701,5 +776,49 @@ public static Pageable GetHostPools(this SubscriptionResource { return GetSubscriptionResourceExtensionClient(subscriptionResource).GetHostPools(pageSize, isDescending, initialSkip, cancellationToken); } + + /// + /// List App Attach packages in subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/appAttachPackages + /// + /// + /// Operation Id + /// AppAttachPackage_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// OData filter expression. Valid properties for filtering are package name, host pool, and resource group. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetAppAttachPackagesAsync(this SubscriptionResource subscriptionResource, string filter = null, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAppAttachPackagesAsync(filter, cancellationToken); + } + + /// + /// List App Attach packages in subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/appAttachPackages + /// + /// + /// Operation Id + /// AppAttachPackage_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// OData filter expression. Valid properties for filtering are package name, host pool, and resource group. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetAppAttachPackages(this SubscriptionResource subscriptionResource, string filter = null, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAppAttachPackages(filter, cancellationToken); + } } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs index 4e2fd4f11d15..1566fb48497b 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -58,5 +58,12 @@ public virtual HostPoolCollection GetHostPools() { return GetCachedClient(Client => new HostPoolCollection(Client, Id)); } + + /// Gets a collection of AppAttachPackageResources in the ResourceGroupResource. + /// An object representing collection of AppAttachPackageResources and their operations over a AppAttachPackageResource. + public virtual AppAttachPackageCollection GetAppAttachPackages() + { + return GetCachedClient(Client => new AppAttachPackageCollection(Client, Id)); + } } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 33906259f0a3..cae1f621e1d2 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -25,6 +25,8 @@ internal partial class SubscriptionResourceExtensionClient : ArmResource private ApplicationGroupsRestOperations _virtualApplicationGroupApplicationGroupsRestClient; private ClientDiagnostics _hostPoolClientDiagnostics; private HostPoolsRestOperations _hostPoolRestClient; + private ClientDiagnostics _appAttachPackageClientDiagnostics; + private AppAttachPackageRestOperations _appAttachPackageRestClient; /// Initializes a new instance of the class for mocking. protected SubscriptionResourceExtensionClient() @@ -46,6 +48,8 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie private ApplicationGroupsRestOperations VirtualApplicationGroupApplicationGroupsRestClient => _virtualApplicationGroupApplicationGroupsRestClient ??= new ApplicationGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(VirtualApplicationGroupResource.ResourceType)); private ClientDiagnostics HostPoolClientDiagnostics => _hostPoolClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DesktopVirtualization", HostPoolResource.ResourceType.Namespace, Diagnostics); private HostPoolsRestOperations HostPoolRestClient => _hostPoolRestClient ??= new HostPoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(HostPoolResource.ResourceType)); + private ClientDiagnostics AppAttachPackageClientDiagnostics => _appAttachPackageClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DesktopVirtualization", AppAttachPackageResource.ResourceType.Namespace, Diagnostics); + private AppAttachPackageRestOperations AppAttachPackageRestClient => _appAttachPackageRestClient ??= new AppAttachPackageRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(AppAttachPackageResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -242,5 +246,51 @@ public virtual Pageable GetHostPools(int? pageSize = null, boo HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HostPoolRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, pageSizeHint, isDescending, initialSkip); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HostPoolResource(Client, HostPoolData.DeserializeHostPoolData(e)), HostPoolClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetHostPools", "value", "nextLink", cancellationToken); } + + /// + /// List App Attach packages in subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/appAttachPackages + /// + /// + /// Operation Id + /// AppAttachPackage_ListBySubscription + /// + /// + /// + /// OData filter expression. Valid properties for filtering are package name, host pool, and resource group. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAppAttachPackagesAsync(string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => AppAttachPackageRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AppAttachPackageRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AppAttachPackageResource(Client, AppAttachPackageData.DeserializeAppAttachPackageData(e)), AppAttachPackageClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetAppAttachPackages", "value", "nextLink", cancellationToken); + } + + /// + /// List App Attach packages in subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/appAttachPackages + /// + /// + /// Operation Id + /// AppAttachPackage_ListBySubscription + /// + /// + /// + /// OData filter expression. Valid properties for filtering are package name, host pool, and resource group. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAppAttachPackages(string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => AppAttachPackageRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AppAttachPackageRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AppAttachPackageResource(Client, AppAttachPackageData.DeserializeAppAttachPackageData(e)), AppAttachPackageClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetAppAttachPackages", "value", "nextLink", cancellationToken); + } } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolData.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolData.cs index cf711c6f8597..b02a58182404 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolData.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolData.cs @@ -29,6 +29,7 @@ public HostPoolData(AzureLocation location, HostPoolType hostPoolType, HostPoolL HostPoolType = hostPoolType; LoadBalancerType = loadBalancerType; ApplicationGroupReferences = new ChangeTrackingList(); + AppAttachPackageReferences = new ChangeTrackingList(); PreferredAppGroupType = preferredAppGroupType; PrivateEndpointConnections = new ChangeTrackingList(); } @@ -53,6 +54,7 @@ public HostPoolData(AzureLocation location, HostPoolType hostPoolType, HostPoolL /// The registration info of HostPool. /// VM template for sessionhosts configuration within hostpool. /// List of applicationGroup links. + /// List of App Attach Package links. /// URL to customer ADFS server for signing WVD SSO certificates. /// ClientId for the registered Relying Party used to issue WVD SSO certificates. /// Path to Azure KeyVault storing the secret used for communication to ADFS. @@ -69,7 +71,7 @@ public HostPoolData(AzureLocation location, HostPoolType hostPoolType, HostPoolL /// Gets or sets the identity. Current supported identity types: SystemAssigned. /// The resource model definition representing SKU. /// Gets or sets the plan. - internal HostPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string objectId, string friendlyName, string description, HostPoolType hostPoolType, PersonalDesktopAssignmentType? personalDesktopAssignmentType, string customRdpProperty, int? maxSessionLimit, HostPoolLoadBalancerType loadBalancerType, int? ring, bool? isValidationEnvironment, HostPoolRegistrationInfo registrationInfo, string vmTemplate, IReadOnlyList applicationGroupReferences, string ssoAdfsAuthority, string ssoClientId, string ssoClientSecretKeyVaultPath, HostPoolSsoSecretType? ssoSecretType, PreferredAppGroupType preferredAppGroupType, bool? startVmOnConnect, bool? isCloudPCResource, HostPoolPublicNetworkAccess? publicNetworkAccess, SessionHostAgentUpdateProperties agentUpdate, IReadOnlyList privateEndpointConnections, ResourceIdentifier managedBy, string kind, ETag? etag, ManagedServiceIdentity identity, DesktopVirtualizationSku sku, ArmPlan plan) : base(id, name, resourceType, systemData, tags, location) + internal HostPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string objectId, string friendlyName, string description, HostPoolType hostPoolType, PersonalDesktopAssignmentType? personalDesktopAssignmentType, string customRdpProperty, int? maxSessionLimit, HostPoolLoadBalancerType loadBalancerType, int? ring, bool? isValidationEnvironment, HostPoolRegistrationInfo registrationInfo, string vmTemplate, IReadOnlyList applicationGroupReferences, IReadOnlyList appAttachPackageReferences, string ssoAdfsAuthority, string ssoClientId, string ssoClientSecretKeyVaultPath, HostPoolSsoSecretType? ssoSecretType, PreferredAppGroupType preferredAppGroupType, bool? startVmOnConnect, bool? isCloudPCResource, HostPoolPublicNetworkAccess? publicNetworkAccess, SessionHostAgentUpdateProperties agentUpdate, IReadOnlyList privateEndpointConnections, ResourceIdentifier managedBy, string kind, ETag? etag, ManagedServiceIdentity identity, DesktopVirtualizationSku sku, ArmPlan plan) : base(id, name, resourceType, systemData, tags, location) { ObjectId = objectId; FriendlyName = friendlyName; @@ -84,6 +86,7 @@ internal HostPoolData(ResourceIdentifier id, string name, ResourceType resourceT RegistrationInfo = registrationInfo; VmTemplate = vmTemplate; ApplicationGroupReferences = applicationGroupReferences; + AppAttachPackageReferences = appAttachPackageReferences; SsoAdfsAuthority = ssoAdfsAuthority; SsoClientId = ssoClientId; SsoClientSecretKeyVaultPath = ssoClientSecretKeyVaultPath; @@ -128,6 +131,8 @@ internal HostPoolData(ResourceIdentifier id, string name, ResourceType resourceT public string VmTemplate { get; set; } /// List of applicationGroup links. public IReadOnlyList ApplicationGroupReferences { get; } + /// List of App Attach Package links. + public IReadOnlyList AppAttachPackageReferences { get; } /// URL to customer ADFS server for signing WVD SSO certificates. public string SsoAdfsAuthority { get; set; } /// ClientId for the registered Relying Party used to issue WVD SSO certificates. diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolResource.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolResource.cs index 1889257785d6..2e347eb01a43 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolResource.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolResource.cs @@ -43,6 +43,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ScalingPlansRestOperations _scalingPlanRestClient; private readonly ClientDiagnostics _userSessionClientDiagnostics; private readonly UserSessionsRestOperations _userSessionRestClient; + private readonly ClientDiagnostics _appAttachPackageInfoClientDiagnostics; + private readonly AppAttachPackageInfoRestOperations _appAttachPackageInfoRestClient; private readonly ClientDiagnostics _msixImagesClientDiagnostics; private readonly MsixImagesRestOperations _msixImagesRestClient; private readonly HostPoolData _data; @@ -77,6 +79,8 @@ internal HostPoolResource(ArmClient client, ResourceIdentifier id) : base(client _userSessionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DesktopVirtualization", UserSessionResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(UserSessionResource.ResourceType, out string userSessionApiVersion); _userSessionRestClient = new UserSessionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, userSessionApiVersion); + _appAttachPackageInfoClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DesktopVirtualization", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _appAttachPackageInfoRestClient = new AppAttachPackageInfoRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _msixImagesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DesktopVirtualization", ProviderConstants.DefaultProviderNamespace, Diagnostics); _msixImagesRestClient = new MsixImagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG @@ -681,6 +685,58 @@ public virtual Pageable GetUserSessions(string filter = nul return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new UserSessionResource(Client, UserSessionData.DeserializeUserSessionData(e)), _userSessionClientDiagnostics, Pipeline, "HostPoolResource.GetUserSessions", "value", "nextLink", cancellationToken); } + /// + /// Gets information from a package given the path to the package. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/importAppAttachPackageInfo + /// + /// + /// Operation Id + /// AppAttachPackageInfo_Import + /// + /// + /// + /// Object containing URI to package image and other optional properties. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable ImportAppAttachPackageInfosAsync(ImportPackageInfoContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _appAttachPackageInfoRestClient.CreateImportRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _appAttachPackageInfoRestClient.CreateImportNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AppAttachPackageResource(Client, AppAttachPackageData.DeserializeAppAttachPackageData(e)), _appAttachPackageInfoClientDiagnostics, Pipeline, "HostPoolResource.ImportAppAttachPackageInfos", "value", "nextLink", cancellationToken); + } + + /// + /// Gets information from a package given the path to the package. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/importAppAttachPackageInfo + /// + /// + /// Operation Id + /// AppAttachPackageInfo_Import + /// + /// + /// + /// Object containing URI to package image and other optional properties. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable ImportAppAttachPackageInfos(ImportPackageInfoContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _appAttachPackageInfoRestClient.CreateImportRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _appAttachPackageInfoRestClient.CreateImportNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AppAttachPackageResource(Client, AppAttachPackageData.DeserializeAppAttachPackageData(e)), _appAttachPackageInfoClientDiagnostics, Pipeline, "HostPoolResource.ImportAppAttachPackageInfos", "value", "nextLink", cancellationToken); + } + /// /// Expands and Lists MSIX packages in an Image, given the Image Path. /// diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageArchitecture.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageArchitecture.cs new file mode 100644 index 000000000000..0518dc0d4b8c --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageArchitecture.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + /// Possible device architectures that an app attach package can be configured for. + public readonly partial struct AppAttachPackageArchitecture : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppAttachPackageArchitecture(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ARMValue = "ARM"; + private const string ARM64Value = "ARM64"; + private const string X86Value = "x86"; + private const string X64Value = "x64"; + private const string NeutralValue = "Neutral"; + private const string X86A64Value = "x86a64"; + private const string ALLValue = "ALL"; + + /// ARM. + public static AppAttachPackageArchitecture ARM { get; } = new AppAttachPackageArchitecture(ARMValue); + /// ARM64. + public static AppAttachPackageArchitecture ARM64 { get; } = new AppAttachPackageArchitecture(ARM64Value); + /// x86. + public static AppAttachPackageArchitecture X86 { get; } = new AppAttachPackageArchitecture(X86Value); + /// x64. + public static AppAttachPackageArchitecture X64 { get; } = new AppAttachPackageArchitecture(X64Value); + /// Neutral. + public static AppAttachPackageArchitecture Neutral { get; } = new AppAttachPackageArchitecture(NeutralValue); + /// x86a64. + public static AppAttachPackageArchitecture X86A64 { get; } = new AppAttachPackageArchitecture(X86A64Value); + /// ALL. + public static AppAttachPackageArchitecture ALL { get; } = new AppAttachPackageArchitecture(ALLValue); + /// Determines if two values are the same. + public static bool operator ==(AppAttachPackageArchitecture left, AppAttachPackageArchitecture right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppAttachPackageArchitecture left, AppAttachPackageArchitecture right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppAttachPackageArchitecture(string value) => new AppAttachPackageArchitecture(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppAttachPackageArchitecture other && Equals(other); + /// + public bool Equals(AppAttachPackageArchitecture other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageData.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageData.Serialization.cs new file mode 100644 index 000000000000..b0f1c4361442 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageData.Serialization.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; +using Azure.ResourceManager.DesktopVirtualization.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DesktopVirtualization +{ + public partial class AppAttachPackageData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + if (Optional.IsDefined(ManagedBy)) + { + writer.WritePropertyName("managedBy"u8); + writer.WriteStringValue(ManagedBy); + } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + JsonSerializer.Serialize(writer, Identity); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku); + } + if (Optional.IsDefined(Plan)) + { + writer.WritePropertyName("plan"u8); + JsonSerializer.Serialize(writer, Plan); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WriteEndObject(); + } + + internal static AppAttachPackageData DeserializeAppAttachPackageData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AppAttachPackageProperties properties = default; + Optional managedBy = default; + Optional kind = default; + Optional etag = default; + Optional identity = default; + Optional sku = default; + Optional plan = default; + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = AppAttachPackageProperties.DeserializeAppAttachPackageProperties(property.Value); + continue; + } + if (property.NameEquals("managedBy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managedBy = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("etag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = DesktopVirtualizationSku.DeserializeDesktopVirtualizationSku(property.Value); + continue; + } + if (property.NameEquals("plan"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + plan = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new AppAttachPackageData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, properties, managedBy.Value, kind.Value, Optional.ToNullable(etag), identity, sku.Value, plan); + } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageInfoProperties.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageInfoProperties.Serialization.cs new file mode 100644 index 000000000000..31e527e8b22f --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageInfoProperties.Serialization.cs @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + public partial class AppAttachPackageInfoProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PackageAlias)) + { + writer.WritePropertyName("packageAlias"u8); + writer.WriteStringValue(PackageAlias); + } + if (Optional.IsDefined(ImagePath)) + { + writer.WritePropertyName("imagePath"u8); + writer.WriteStringValue(ImagePath); + } + if (Optional.IsDefined(PackageName)) + { + writer.WritePropertyName("packageName"u8); + writer.WriteStringValue(PackageName); + } + if (Optional.IsDefined(PackageFamilyName)) + { + writer.WritePropertyName("packageFamilyName"u8); + writer.WriteStringValue(PackageFamilyName); + } + if (Optional.IsDefined(PackageFullName)) + { + writer.WritePropertyName("packageFullName"u8); + writer.WriteStringValue(PackageFullName); + } + if (Optional.IsDefined(DisplayName)) + { + if (DisplayName != null) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + else + { + writer.WriteNull("displayName"); + } + } + if (Optional.IsDefined(PackageRelativePath)) + { + writer.WritePropertyName("packageRelativePath"u8); + writer.WriteStringValue(PackageRelativePath); + } + if (Optional.IsDefined(IsRegularRegistration)) + { + writer.WritePropertyName("isRegularRegistration"u8); + writer.WriteBooleanValue(IsRegularRegistration.Value); + } + if (Optional.IsDefined(IsActive)) + { + writer.WritePropertyName("isActive"u8); + writer.WriteBooleanValue(IsActive.Value); + } + if (Optional.IsCollectionDefined(PackageDependencies)) + { + if (PackageDependencies != null) + { + writer.WritePropertyName("packageDependencies"u8); + writer.WriteStartArray(); + foreach (var item in PackageDependencies) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("packageDependencies"); + } + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(LastUpdated)) + { + writer.WritePropertyName("lastUpdated"u8); + writer.WriteStringValue(LastUpdated.Value, "O"); + } + if (Optional.IsCollectionDefined(PackageApplications)) + { + writer.WritePropertyName("packageApplications"u8); + writer.WriteStartArray(); + foreach (var item in PackageApplications) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(CertificateName)) + { + if (CertificateName != null) + { + writer.WritePropertyName("certificateName"u8); + writer.WriteStringValue(CertificateName); + } + else + { + writer.WriteNull("certificateName"); + } + } + if (Optional.IsDefined(CertificateExpiry)) + { + if (CertificateExpiry != null) + { + writer.WritePropertyName("certificateExpiry"u8); + writer.WriteStringValue(CertificateExpiry.Value, "O"); + } + else + { + writer.WriteNull("certificateExpiry"); + } + } + if (Optional.IsDefined(IsPackageTimestamped)) + { + if (IsPackageTimestamped != null) + { + writer.WritePropertyName("isPackageTimestamped"u8); + writer.WriteStringValue(IsPackageTimestamped.Value.ToString()); + } + else + { + writer.WriteNull("isPackageTimestamped"); + } + } + writer.WriteEndObject(); + } + + internal static AppAttachPackageInfoProperties DeserializeAppAttachPackageInfoProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional packageAlias = default; + Optional imagePath = default; + Optional packageName = default; + Optional packageFamilyName = default; + Optional packageFullName = default; + Optional displayName = default; + Optional packageRelativePath = default; + Optional isRegularRegistration = default; + Optional isActive = default; + Optional> packageDependencies = default; + Optional version = default; + Optional lastUpdated = default; + Optional> packageApplications = default; + Optional certificateName = default; + Optional certificateExpiry = default; + Optional isPackageTimestamped = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("packageAlias"u8)) + { + packageAlias = property.Value.GetString(); + continue; + } + if (property.NameEquals("imagePath"u8)) + { + imagePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("packageName"u8)) + { + packageName = property.Value.GetString(); + continue; + } + if (property.NameEquals("packageFamilyName"u8)) + { + packageFamilyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("packageFullName"u8)) + { + packageFullName = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + displayName = null; + continue; + } + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("packageRelativePath"u8)) + { + packageRelativePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRegularRegistration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRegularRegistration = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isActive"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isActive = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("packageDependencies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + packageDependencies = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MsixPackageDependencies.DeserializeMsixPackageDependencies(item)); + } + packageDependencies = array; + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastUpdated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastUpdated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("packageApplications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MsixPackageApplications.DeserializeMsixPackageApplications(item)); + } + packageApplications = array; + continue; + } + if (property.NameEquals("certificateName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + certificateName = null; + continue; + } + certificateName = property.Value.GetString(); + continue; + } + if (property.NameEquals("certificateExpiry"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + certificateExpiry = null; + continue; + } + certificateExpiry = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("isPackageTimestamped"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + isPackageTimestamped = null; + continue; + } + isPackageTimestamped = new PackageTimestamped(property.Value.GetString()); + continue; + } + } + return new AppAttachPackageInfoProperties(packageAlias.Value, imagePath.Value, packageName.Value, packageFamilyName.Value, packageFullName.Value, displayName.Value, packageRelativePath.Value, Optional.ToNullable(isRegularRegistration), Optional.ToNullable(isActive), Optional.ToList(packageDependencies), version.Value, Optional.ToNullable(lastUpdated), Optional.ToList(packageApplications), certificateName.Value, Optional.ToNullable(certificateExpiry), Optional.ToNullable(isPackageTimestamped)); + } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageInfoProperties.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageInfoProperties.cs new file mode 100644 index 000000000000..c64d1b6ee9a2 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageInfoProperties.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + /// Schema for Import Package Information properties. + public partial class AppAttachPackageInfoProperties + { + /// Initializes a new instance of AppAttachPackageInfoProperties. + public AppAttachPackageInfoProperties() + { + PackageDependencies = new ChangeTrackingList(); + PackageApplications = new ChangeTrackingList(); + } + + /// Initializes a new instance of AppAttachPackageInfoProperties. + /// Alias of App Attach Package. Assigned at import time. + /// VHD/CIM image path on Network Share. + /// Package Name from appxmanifest.xml. + /// Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. + /// Package Full Name from appxmanifest.xml. + /// User friendly Name to be displayed in the portal. + /// Relative Path to the package inside the image. + /// Specifies how to register Package in feed. + /// Make this version of the package the active one across the hostpool. + /// List of package dependencies. + /// Package Version found in the appxmanifest.xml. + /// Date Package was last updated, found in the appxmanifest.xml. + /// List of package applications. + /// Certificate name found in the appxmanifest.xml. + /// Date certificate expires, found in the appxmanifest.xml. + /// Is package timestamped so it can ignore the certificate expiry date. + internal AppAttachPackageInfoProperties(string packageAlias, string imagePath, string packageName, string packageFamilyName, string packageFullName, string displayName, string packageRelativePath, bool? isRegularRegistration, bool? isActive, IList packageDependencies, string version, DateTimeOffset? lastUpdated, IList packageApplications, string certificateName, DateTimeOffset? certificateExpiry, PackageTimestamped? isPackageTimestamped) + { + PackageAlias = packageAlias; + ImagePath = imagePath; + PackageName = packageName; + PackageFamilyName = packageFamilyName; + PackageFullName = packageFullName; + DisplayName = displayName; + PackageRelativePath = packageRelativePath; + IsRegularRegistration = isRegularRegistration; + IsActive = isActive; + PackageDependencies = packageDependencies; + Version = version; + LastUpdated = lastUpdated; + PackageApplications = packageApplications; + CertificateName = certificateName; + CertificateExpiry = certificateExpiry; + IsPackageTimestamped = isPackageTimestamped; + } + + /// Alias of App Attach Package. Assigned at import time. + public string PackageAlias { get; set; } + /// VHD/CIM image path on Network Share. + public string ImagePath { get; set; } + /// Package Name from appxmanifest.xml. + public string PackageName { get; set; } + /// Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. + public string PackageFamilyName { get; set; } + /// Package Full Name from appxmanifest.xml. + public string PackageFullName { get; set; } + /// User friendly Name to be displayed in the portal. + public string DisplayName { get; set; } + /// Relative Path to the package inside the image. + public string PackageRelativePath { get; set; } + /// Specifies how to register Package in feed. + public bool? IsRegularRegistration { get; set; } + /// Make this version of the package the active one across the hostpool. + public bool? IsActive { get; set; } + /// List of package dependencies. + public IList PackageDependencies { get; set; } + /// Package Version found in the appxmanifest.xml. + public string Version { get; set; } + /// Date Package was last updated, found in the appxmanifest.xml. + public DateTimeOffset? LastUpdated { get; set; } + /// List of package applications. + public IList PackageApplications { get; } + /// Certificate name found in the appxmanifest.xml. + public string CertificateName { get; set; } + /// Date certificate expires, found in the appxmanifest.xml. + public DateTimeOffset? CertificateExpiry { get; set; } + /// Is package timestamped so it can ignore the certificate expiry date. + public PackageTimestamped? IsPackageTimestamped { get; set; } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageList.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageList.Serialization.cs new file mode 100644 index 000000000000..3da55f525ec0 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageList.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.DesktopVirtualization; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + internal partial class AppAttachPackageList + { + internal static AppAttachPackageList DeserializeAppAttachPackageList(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AppAttachPackageData.DeserializeAppAttachPackageData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new AppAttachPackageList(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageList.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageList.cs new file mode 100644 index 000000000000..5defb3e6f851 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageList.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DesktopVirtualization; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + /// List of App Attach Package definitions. + internal partial class AppAttachPackageList + { + /// Initializes a new instance of AppAttachPackageList. + internal AppAttachPackageList() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of AppAttachPackageList. + /// List of App Attach Package definitions. + /// Link to the next page of results. + internal AppAttachPackageList(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of App Attach Package definitions. + public IReadOnlyList Value { get; } + /// Link to the next page of results. + public string NextLink { get; } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.Serialization.cs new file mode 100644 index 000000000000..20c2e0db7786 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.Serialization.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + public partial class AppAttachPackagePatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + + internal static AppAttachPackagePatch DeserializeAppAttachPackagePatch(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> tags = default; + Optional properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = AppAttachPackagePatchProperties.DeserializeAppAttachPackagePatchProperties(property.Value); + 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; + } + } + return new AppAttachPackagePatch(id, name, type, systemData.Value, Optional.ToDictionary(tags), properties.Value); + } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.cs new file mode 100644 index 000000000000..ac7dc92157ba --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatch.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + /// Schema for patchable App Attach Package properties. + public partial class AppAttachPackagePatch : ResourceData + { + /// Initializes a new instance of AppAttachPackagePatch. + public AppAttachPackagePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of AppAttachPackagePatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// tags to be updated. + /// Detailed properties for App Attach Package. + internal AppAttachPackagePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AppAttachPackagePatchProperties properties) : base(id, name, resourceType, systemData) + { + Tags = tags; + Properties = properties; + } + + /// tags to be updated. + public IDictionary Tags { get; } + /// Detailed properties for App Attach Package. + public AppAttachPackagePatchProperties Properties { get; set; } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.Serialization.cs new file mode 100644 index 000000000000..74e06b215291 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + public partial class AppAttachPackagePatchProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Image)) + { + writer.WritePropertyName("image"u8); + writer.WriteObjectValue(Image); + } + if (Optional.IsCollectionDefined(HostPoolReferences)) + { + writer.WritePropertyName("hostPoolReferences"u8); + writer.WriteStartArray(); + foreach (var item in HostPoolReferences) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(KeyVaultURL)) + { + writer.WritePropertyName("keyVaultURL"u8); + writer.WriteStringValue(KeyVaultURL); + } + if (Optional.IsDefined(FailHealthCheckOnStagingFailure)) + { + writer.WritePropertyName("failHealthCheckOnStagingFailure"u8); + writer.WriteStringValue(FailHealthCheckOnStagingFailure.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static AppAttachPackagePatchProperties DeserializeAppAttachPackagePatchProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional image = default; + Optional> hostPoolReferences = default; + Optional keyVaultURL = default; + Optional failHealthCheckOnStagingFailure = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("image"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + image = AppAttachPackageInfoProperties.DeserializeAppAttachPackageInfoProperties(property.Value); + continue; + } + if (property.NameEquals("hostPoolReferences"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + hostPoolReferences = array; + continue; + } + if (property.NameEquals("keyVaultURL"u8)) + { + keyVaultURL = property.Value.GetString(); + continue; + } + if (property.NameEquals("failHealthCheckOnStagingFailure"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failHealthCheckOnStagingFailure = new FailHealthCheckOnStagingFailure(property.Value.GetString()); + continue; + } + } + return new AppAttachPackagePatchProperties(image.Value, Optional.ToList(hostPoolReferences), keyVaultURL.Value, Optional.ToNullable(failHealthCheckOnStagingFailure)); + } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.cs new file mode 100644 index 000000000000..2c00d2fe8f98 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackagePatchProperties.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + /// Schema for patchable fields on an App Attach Package. + public partial class AppAttachPackagePatchProperties + { + /// Initializes a new instance of AppAttachPackagePatchProperties. + public AppAttachPackagePatchProperties() + { + HostPoolReferences = new ChangeTrackingList(); + } + + /// Initializes a new instance of AppAttachPackagePatchProperties. + /// Detailed properties for App Attach Package. + /// List of Hostpool resource Ids. + /// URL of keyvault location to store certificate. + /// Parameter indicating how the health check should behave if this package fails staging. + internal AppAttachPackagePatchProperties(AppAttachPackageInfoProperties image, IList hostPoolReferences, string keyVaultURL, FailHealthCheckOnStagingFailure? failHealthCheckOnStagingFailure) + { + Image = image; + HostPoolReferences = hostPoolReferences; + KeyVaultURL = keyVaultURL; + FailHealthCheckOnStagingFailure = failHealthCheckOnStagingFailure; + } + + /// Detailed properties for App Attach Package. + public AppAttachPackageInfoProperties Image { get; set; } + /// List of Hostpool resource Ids. + public IList HostPoolReferences { get; } + /// URL of keyvault location to store certificate. + public string KeyVaultURL { get; set; } + /// Parameter indicating how the health check should behave if this package fails staging. + public FailHealthCheckOnStagingFailure? FailHealthCheckOnStagingFailure { get; set; } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.Serialization.cs new file mode 100644 index 000000000000..d564508fcaf2 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + public partial class AppAttachPackageProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Image)) + { + writer.WritePropertyName("image"u8); + writer.WriteObjectValue(Image); + } + if (Optional.IsCollectionDefined(HostPoolReferences)) + { + writer.WritePropertyName("hostPoolReferences"u8); + writer.WriteStartArray(); + foreach (var item in HostPoolReferences) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(KeyVaultURL)) + { + writer.WritePropertyName("keyVaultURL"u8); + writer.WriteStringValue(KeyVaultURL); + } + if (Optional.IsDefined(FailHealthCheckOnStagingFailure)) + { + writer.WritePropertyName("failHealthCheckOnStagingFailure"u8); + writer.WriteStringValue(FailHealthCheckOnStagingFailure.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static AppAttachPackageProperties DeserializeAppAttachPackageProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional provisioningState = default; + Optional image = default; + Optional> hostPoolReferences = default; + Optional keyVaultURL = default; + Optional failHealthCheckOnStagingFailure = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("image"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + image = AppAttachPackageInfoProperties.DeserializeAppAttachPackageInfoProperties(property.Value); + continue; + } + if (property.NameEquals("hostPoolReferences"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + hostPoolReferences = array; + continue; + } + if (property.NameEquals("keyVaultURL"u8)) + { + keyVaultURL = property.Value.GetString(); + continue; + } + if (property.NameEquals("failHealthCheckOnStagingFailure"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failHealthCheckOnStagingFailure = new FailHealthCheckOnStagingFailure(property.Value.GetString()); + continue; + } + } + return new AppAttachPackageProperties(Optional.ToNullable(provisioningState), image.Value, Optional.ToList(hostPoolReferences), keyVaultURL.Value, Optional.ToNullable(failHealthCheckOnStagingFailure)); + } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.cs new file mode 100644 index 000000000000..3286d80e0fbd --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/AppAttachPackageProperties.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + /// Schema for App Attach Package properties. + public partial class AppAttachPackageProperties + { + /// Initializes a new instance of AppAttachPackageProperties. + public AppAttachPackageProperties() + { + HostPoolReferences = new ChangeTrackingList(); + } + + /// Initializes a new instance of AppAttachPackageProperties. + /// The provisioning state of the App Attach Package. + /// Detailed properties for App Attach Package. + /// List of Hostpool resource Ids. + /// URL of keyvault location to store certificate. + /// Parameter indicating how the health check should behave if this package fails staging. + internal AppAttachPackageProperties(ProvisioningState? provisioningState, AppAttachPackageInfoProperties image, IList hostPoolReferences, string keyVaultURL, FailHealthCheckOnStagingFailure? failHealthCheckOnStagingFailure) + { + ProvisioningState = provisioningState; + Image = image; + HostPoolReferences = hostPoolReferences; + KeyVaultURL = keyVaultURL; + FailHealthCheckOnStagingFailure = failHealthCheckOnStagingFailure; + } + + /// The provisioning state of the App Attach Package. + public ProvisioningState? ProvisioningState { get; } + /// Detailed properties for App Attach Package. + public AppAttachPackageInfoProperties Image { get; set; } + /// List of Hostpool resource Ids. + public IList HostPoolReferences { get; } + /// URL of keyvault location to store certificate. + public string KeyVaultURL { get; set; } + /// Parameter indicating how the health check should behave if this package fails staging. + public FailHealthCheckOnStagingFailure? FailHealthCheckOnStagingFailure { get; set; } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ExpandMsixImage.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ExpandMsixImage.Serialization.cs index 3bd1f5b9941a..7ec8123a5187 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ExpandMsixImage.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ExpandMsixImage.Serialization.cs @@ -109,6 +109,30 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } + if (Optional.IsDefined(CertificateName)) + { + if (CertificateName != null) + { + writer.WritePropertyName("certificateName"u8); + writer.WriteStringValue(CertificateName); + } + else + { + writer.WriteNull("certificateName"); + } + } + if (Optional.IsDefined(CertificateExpiry)) + { + if (CertificateExpiry != null) + { + writer.WritePropertyName("certificateExpiry"u8); + writer.WriteStringValue(CertificateExpiry.Value, "O"); + } + else + { + writer.WriteNull("certificateExpiry"); + } + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -136,6 +160,8 @@ internal static ExpandMsixImage DeserializeExpandMsixImage(JsonElement element) Optional version = default; Optional lastUpdated = default; Optional> packageApplications = default; + Optional certificateName = default; + Optional certificateExpiry = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -272,11 +298,31 @@ internal static ExpandMsixImage DeserializeExpandMsixImage(JsonElement element) packageApplications = array; continue; } + if (property0.NameEquals("certificateName"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + certificateName = null; + continue; + } + certificateName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("certificateExpiry"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + certificateExpiry = null; + continue; + } + certificateExpiry = property0.Value.GetDateTimeOffset("O"); + continue; + } } continue; } } - return new ExpandMsixImage(id, name, type, systemData.Value, packageAlias.Value, imagePath.Value, packageName.Value, packageFamilyName.Value, packageFullName.Value, displayName.Value, packageRelativePath.Value, Optional.ToNullable(isRegularRegistration), Optional.ToNullable(isActive), Optional.ToList(packageDependencies), version.Value, Optional.ToNullable(lastUpdated), Optional.ToList(packageApplications)); + return new ExpandMsixImage(id, name, type, systemData.Value, packageAlias.Value, imagePath.Value, packageName.Value, packageFamilyName.Value, packageFullName.Value, displayName.Value, packageRelativePath.Value, Optional.ToNullable(isRegularRegistration), Optional.ToNullable(isActive), Optional.ToList(packageDependencies), version.Value, Optional.ToNullable(lastUpdated), Optional.ToList(packageApplications), certificateName.Value, Optional.ToNullable(certificateExpiry)); } } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ExpandMsixImage.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ExpandMsixImage.cs index a069860ff445..c5534c9b5a58 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ExpandMsixImage.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ExpandMsixImage.cs @@ -40,7 +40,9 @@ public ExpandMsixImage() /// Package Version found in the appxmanifest.xml. /// Date Package was last updated, found in the appxmanifest.xml. /// List of package applications. - internal ExpandMsixImage(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string packageAlias, string imagePath, string packageName, string packageFamilyName, string packageFullName, string displayName, string packageRelativePath, bool? isRegularRegistration, bool? isActive, IList packageDependencies, string version, DateTimeOffset? lastUpdatedOn, IList packageApplications) : base(id, name, resourceType, systemData) + /// Certificate name found in the appxmanifest.xml. + /// Date certificate expires, found in the appxmanifest.xml. + internal ExpandMsixImage(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string packageAlias, string imagePath, string packageName, string packageFamilyName, string packageFullName, string displayName, string packageRelativePath, bool? isRegularRegistration, bool? isActive, IList packageDependencies, string version, DateTimeOffset? lastUpdatedOn, IList packageApplications, string certificateName, DateTimeOffset? certificateExpiry) : base(id, name, resourceType, systemData) { PackageAlias = packageAlias; ImagePath = imagePath; @@ -55,6 +57,8 @@ internal ExpandMsixImage(ResourceIdentifier id, string name, ResourceType resour Version = version; LastUpdatedOn = lastUpdatedOn; PackageApplications = packageApplications; + CertificateName = certificateName; + CertificateExpiry = certificateExpiry; } /// Alias of MSIX Package. @@ -83,5 +87,9 @@ internal ExpandMsixImage(ResourceIdentifier id, string name, ResourceType resour public DateTimeOffset? LastUpdatedOn { get; set; } /// List of package applications. public IList PackageApplications { get; } + /// Certificate name found in the appxmanifest.xml. + public string CertificateName { get; set; } + /// Date certificate expires, found in the appxmanifest.xml. + public DateTimeOffset? CertificateExpiry { get; set; } } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/FailHealthCheckOnStagingFailure.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/FailHealthCheckOnStagingFailure.cs new file mode 100644 index 000000000000..f3e331c04f6c --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/FailHealthCheckOnStagingFailure.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + /// Parameter indicating how the health check should behave if this package fails staging. + public readonly partial struct FailHealthCheckOnStagingFailure : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FailHealthCheckOnStagingFailure(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnhealthyValue = "Unhealthy"; + private const string NeedsAssistanceValue = "NeedsAssistance"; + private const string DoNotFailValue = "DoNotFail"; + + /// Unhealthy. + public static FailHealthCheckOnStagingFailure Unhealthy { get; } = new FailHealthCheckOnStagingFailure(UnhealthyValue); + /// NeedsAssistance. + public static FailHealthCheckOnStagingFailure NeedsAssistance { get; } = new FailHealthCheckOnStagingFailure(NeedsAssistanceValue); + /// DoNotFail. + public static FailHealthCheckOnStagingFailure DoNotFail { get; } = new FailHealthCheckOnStagingFailure(DoNotFailValue); + /// Determines if two values are the same. + public static bool operator ==(FailHealthCheckOnStagingFailure left, FailHealthCheckOnStagingFailure right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FailHealthCheckOnStagingFailure left, FailHealthCheckOnStagingFailure right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FailHealthCheckOnStagingFailure(string value) => new FailHealthCheckOnStagingFailure(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FailHealthCheckOnStagingFailure other && Equals(other); + /// + public bool Equals(FailHealthCheckOnStagingFailure other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/HostPoolData.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/HostPoolData.Serialization.cs index 5e049d407d02..08183b17db0f 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/HostPoolData.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/HostPoolData.Serialization.cs @@ -180,6 +180,7 @@ internal static HostPoolData DeserializeHostPoolData(JsonElement element) Optional registrationInfo = default; Optional vmTemplate = default; Optional> applicationGroupReferences = default; + Optional> appAttachPackageReferences = default; Optional ssoadfsAuthority = default; Optional ssoClientId = default; Optional ssoClientSecretKeyVaultPath = default; @@ -388,6 +389,20 @@ internal static HostPoolData DeserializeHostPoolData(JsonElement element) applicationGroupReferences = array; continue; } + if (property0.NameEquals("appAttachPackageReferences"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + appAttachPackageReferences = array; + continue; + } if (property0.NameEquals("ssoadfsAuthority"u8)) { ssoadfsAuthority = property0.Value.GetString(); @@ -471,7 +486,7 @@ internal static HostPoolData DeserializeHostPoolData(JsonElement element) continue; } } - return new HostPoolData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, objectId.Value, friendlyName.Value, description.Value, hostPoolType, Optional.ToNullable(personalDesktopAssignmentType), customRdpProperty.Value, Optional.ToNullable(maxSessionLimit), loadBalancerType, Optional.ToNullable(ring), Optional.ToNullable(validationEnvironment), registrationInfo.Value, vmTemplate.Value, Optional.ToList(applicationGroupReferences), ssoadfsAuthority.Value, ssoClientId.Value, ssoClientSecretKeyVaultPath.Value, Optional.ToNullable(ssoSecretType), preferredAppGroupType, Optional.ToNullable(startVmOnConnect), Optional.ToNullable(cloudPCResource), Optional.ToNullable(publicNetworkAccess), agentUpdate.Value, Optional.ToList(privateEndpointConnections), managedBy.Value, kind.Value, Optional.ToNullable(etag), identity, sku.Value, plan); + return new HostPoolData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, objectId.Value, friendlyName.Value, description.Value, hostPoolType, Optional.ToNullable(personalDesktopAssignmentType), customRdpProperty.Value, Optional.ToNullable(maxSessionLimit), loadBalancerType, Optional.ToNullable(ring), Optional.ToNullable(validationEnvironment), registrationInfo.Value, vmTemplate.Value, Optional.ToList(applicationGroupReferences), Optional.ToList(appAttachPackageReferences), ssoadfsAuthority.Value, ssoClientId.Value, ssoClientSecretKeyVaultPath.Value, Optional.ToNullable(ssoSecretType), preferredAppGroupType, Optional.ToNullable(startVmOnConnect), Optional.ToNullable(cloudPCResource), Optional.ToNullable(publicNetworkAccess), agentUpdate.Value, Optional.ToList(privateEndpointConnections), managedBy.Value, kind.Value, Optional.ToNullable(etag), identity, sku.Value, plan); } } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ImportPackageInfoContent.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ImportPackageInfoContent.Serialization.cs new file mode 100644 index 000000000000..425ab86c91f8 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ImportPackageInfoContent.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + public partial class ImportPackageInfoContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (Optional.IsDefined(PackageArchitecture)) + { + if (PackageArchitecture != null) + { + writer.WritePropertyName("packageArchitecture"u8); + writer.WriteStringValue(PackageArchitecture.Value.ToString()); + } + else + { + writer.WriteNull("packageArchitecture"); + } + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ImportPackageInfoContent.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ImportPackageInfoContent.cs new file mode 100644 index 000000000000..5ee5362a9e14 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ImportPackageInfoContent.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + /// Information to import app attach package. + public partial class ImportPackageInfoContent + { + /// Initializes a new instance of ImportPackageInfoContent. + public ImportPackageInfoContent() + { + } + + /// URI to Image. + public string Path { get; set; } + /// Possible device architectures that an app attach package can be configured for. + public AppAttachPackageArchitecture? PackageArchitecture { get; set; } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/PackageTimestamped.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/PackageTimestamped.cs new file mode 100644 index 000000000000..953b82ff0159 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/PackageTimestamped.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + /// Is package timestamped so it can ignore the certificate expiry date. + public readonly partial struct PackageTimestamped : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PackageTimestamped(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TimestampedValue = "Timestamped"; + private const string NotTimestampedValue = "NotTimestamped"; + + /// Timestamped. + public static PackageTimestamped Timestamped { get; } = new PackageTimestamped(TimestampedValue); + /// NotTimestamped. + public static PackageTimestamped NotTimestamped { get; } = new PackageTimestamped(NotTimestampedValue); + /// Determines if two values are the same. + public static bool operator ==(PackageTimestamped left, PackageTimestamped right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PackageTimestamped left, PackageTimestamped right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PackageTimestamped(string value) => new PackageTimestamped(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PackageTimestamped other && Equals(other); + /// + public bool Equals(PackageTimestamped other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ProvisioningState.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..d5b0f7611e96 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/Models/ProvisioningState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DesktopVirtualization.Models +{ + /// The current provisioning state. + public readonly partial struct ProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string ProvisioningValue = "Provisioning"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Succeeded. + public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); + /// Provisioning. + public static ProvisioningState Provisioning { get; } = new ProvisioningState(ProvisioningValue); + /// Failed. + public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Canceled. + public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); + /// + public bool Equals(ProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/AppAttachPackageInfoRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/AppAttachPackageInfoRestOperations.cs new file mode 100644 index 000000000000..955fe1e4e5a3 --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/AppAttachPackageInfoRestOperations.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DesktopVirtualization.Models; + +namespace Azure.ResourceManager.DesktopVirtualization +{ + internal partial class AppAttachPackageInfoRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AppAttachPackageInfoRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AppAttachPackageInfoRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-10-04-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateImportRequest(string subscriptionId, string resourceGroupName, string hostPoolName, ImportPackageInfoContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DesktopVirtualization/hostPools/", false); + uri.AppendPath(hostPoolName, true); + uri.AppendPath("/importAppAttachPackageInfo", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Gets information from a package given the path to the package. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the host pool within the specified resource group. + /// Object containing URI to package image and other optional properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ImportAsync(string subscriptionId, string resourceGroupName, string hostPoolName, ImportPackageInfoContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(hostPoolName, nameof(hostPoolName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateImportRequest(subscriptionId, resourceGroupName, hostPoolName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppAttachPackageList.DeserializeAppAttachPackageList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets information from a package given the path to the package. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the host pool within the specified resource group. + /// Object containing URI to package image and other optional properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Import(string subscriptionId, string resourceGroupName, string hostPoolName, ImportPackageInfoContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(hostPoolName, nameof(hostPoolName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateImportRequest(subscriptionId, resourceGroupName, hostPoolName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppAttachPackageList.DeserializeAppAttachPackageList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateImportNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string hostPoolName, ImportPackageInfoContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets information from a package given the path to the package. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the host pool within the specified resource group. + /// Object containing URI to package image and other optional properties. + /// The cancellation token to use. + /// , , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ImportNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string hostPoolName, ImportPackageInfoContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(hostPoolName, nameof(hostPoolName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateImportNextPageRequest(nextLink, subscriptionId, resourceGroupName, hostPoolName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppAttachPackageList.DeserializeAppAttachPackageList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets information from a package given the path to the package. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the host pool within the specified resource group. + /// Object containing URI to package image and other optional properties. + /// The cancellation token to use. + /// , , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ImportNextPage(string nextLink, string subscriptionId, string resourceGroupName, string hostPoolName, ImportPackageInfoContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(hostPoolName, nameof(hostPoolName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateImportNextPageRequest(nextLink, subscriptionId, resourceGroupName, hostPoolName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppAttachPackageList.DeserializeAppAttachPackageList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/AppAttachPackageRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/AppAttachPackageRestOperations.cs new file mode 100644 index 000000000000..beea041685fa --- /dev/null +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/AppAttachPackageRestOperations.cs @@ -0,0 +1,668 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DesktopVirtualization.Models; + +namespace Azure.ResourceManager.DesktopVirtualization +{ + internal partial class AppAttachPackageRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AppAttachPackageRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AppAttachPackageRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-10-04-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string appAttachPackageName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DesktopVirtualization/appAttachPackages/", false); + uri.AppendPath(appAttachPackageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get an app attach package. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the App Attach package arm object. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string appAttachPackageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, appAttachPackageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppAttachPackageData.DeserializeAppAttachPackageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AppAttachPackageData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get an app attach package. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the App Attach package arm object. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string appAttachPackageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, appAttachPackageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppAttachPackageData.DeserializeAppAttachPackageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AppAttachPackageData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string appAttachPackageName, AppAttachPackageData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DesktopVirtualization/appAttachPackages/", false); + uri.AppendPath(appAttachPackageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update an App Attach package. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the App Attach package arm object. + /// Object containing App Attach Package definitions. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string appAttachPackageName, AppAttachPackageData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, appAttachPackageName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + AppAttachPackageData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppAttachPackageData.DeserializeAppAttachPackageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update an App Attach package. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the App Attach package arm object. + /// Object containing App Attach Package definitions. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string appAttachPackageName, AppAttachPackageData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, appAttachPackageName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + AppAttachPackageData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppAttachPackageData.DeserializeAppAttachPackageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string appAttachPackageName, bool? force) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DesktopVirtualization/appAttachPackages/", false); + uri.AppendPath(appAttachPackageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (force != null) + { + uri.AppendQuery("force", force.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Remove an App Attach Package. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the App Attach package arm object. + /// Force flag to delete App Attach package. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string appAttachPackageName, bool? force = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, appAttachPackageName, force); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Remove an App Attach Package. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the App Attach package arm object. + /// Force flag to delete App Attach package. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string appAttachPackageName, bool? force = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, appAttachPackageName, force); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string appAttachPackageName, AppAttachPackagePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DesktopVirtualization/appAttachPackages/", false); + uri.AppendPath(appAttachPackageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update an App Attach Package. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the App Attach package arm object. + /// Object containing App Attach Package definition. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string appAttachPackageName, AppAttachPackagePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, appAttachPackageName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppAttachPackageData.DeserializeAppAttachPackageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update an App Attach Package. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the App Attach package arm object. + /// Object containing App Attach Package definition. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string appAttachPackageName, AppAttachPackagePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appAttachPackageName, nameof(appAttachPackageName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, appAttachPackageName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppAttachPackageData.DeserializeAppAttachPackageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DesktopVirtualization/appAttachPackages", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List App Attach packages in resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// OData filter expression. Valid properties for filtering are package name and host pool. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppAttachPackageList.DeserializeAppAttachPackageList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List App Attach packages in resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// OData filter expression. Valid properties for filtering are package name and host pool. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppAttachPackageList.DeserializeAppAttachPackageList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DesktopVirtualization/appAttachPackages", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List App Attach packages in subscription. + /// The ID of the target subscription. + /// OData filter expression. Valid properties for filtering are package name, host pool, and resource group. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppAttachPackageList.DeserializeAppAttachPackageList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List App Attach packages in subscription. + /// The ID of the target subscription. + /// OData filter expression. Valid properties for filtering are package name, host pool, and resource group. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppAttachPackageList.DeserializeAppAttachPackageList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List App Attach packages in resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// OData filter expression. Valid properties for filtering are package name and host pool. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppAttachPackageList.DeserializeAppAttachPackageList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List App Attach packages in resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// OData filter expression. Valid properties for filtering are package name and host pool. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppAttachPackageList.DeserializeAppAttachPackageList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List App Attach packages in subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// OData filter expression. Valid properties for filtering are package name, host pool, and resource group. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppAttachPackageList.DeserializeAppAttachPackageList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List App Attach packages in subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// OData filter expression. Valid properties for filtering are package name, host pool, and resource group. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppAttachPackageList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppAttachPackageList.DeserializeAppAttachPackageList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ApplicationGroupsRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ApplicationGroupsRestOperations.cs index 999e50a45eb2..17c583bc9071 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ApplicationGroupsRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ApplicationGroupsRestOperations.cs @@ -33,7 +33,7 @@ public ApplicationGroupsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ApplicationsRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ApplicationsRestOperations.cs index 3386aa06b16a..94867e7ae623 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ApplicationsRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ApplicationsRestOperations.cs @@ -33,7 +33,7 @@ public ApplicationsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/DesktopsRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/DesktopsRestOperations.cs index 8d7006712daf..c01126c1a93a 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/DesktopsRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/DesktopsRestOperations.cs @@ -33,7 +33,7 @@ public DesktopsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/HostPoolsRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/HostPoolsRestOperations.cs index 5696ab99400e..62c4a3f7f7e8 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/HostPoolsRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/HostPoolsRestOperations.cs @@ -33,7 +33,7 @@ public HostPoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/MsixImagesRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/MsixImagesRestOperations.cs index a6c6f68b2b25..8f6746b42167 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/MsixImagesRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/MsixImagesRestOperations.cs @@ -33,7 +33,7 @@ public MsixImagesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/MsixPackagesRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/MsixPackagesRestOperations.cs index efaca9e3be64..bda3ed2c1251 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/MsixPackagesRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/MsixPackagesRestOperations.cs @@ -33,7 +33,7 @@ public MsixPackagesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 9df9d47cc537..a9c2aa37f42c 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -33,7 +33,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index c767fa8f3c9d..2f59eacdd276 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -33,7 +33,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ScalingPlanPersonalSchedulesRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ScalingPlanPersonalSchedulesRestOperations.cs index ac50e3cf83d9..f99beaed9a4a 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ScalingPlanPersonalSchedulesRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ScalingPlanPersonalSchedulesRestOperations.cs @@ -33,7 +33,7 @@ public ScalingPlanPersonalSchedulesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ScalingPlanPooledSchedulesRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ScalingPlanPooledSchedulesRestOperations.cs index a6406056096f..3d2b584570d2 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ScalingPlanPooledSchedulesRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ScalingPlanPooledSchedulesRestOperations.cs @@ -33,7 +33,7 @@ public ScalingPlanPooledSchedulesRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ScalingPlansRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ScalingPlansRestOperations.cs index 8ef3a07d4469..884e9cb17320 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ScalingPlansRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/ScalingPlansRestOperations.cs @@ -33,7 +33,7 @@ public ScalingPlansRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/SessionHostsRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/SessionHostsRestOperations.cs index 73a9e6b5ea60..7f296ffa9fcf 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/SessionHostsRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/SessionHostsRestOperations.cs @@ -33,7 +33,7 @@ public SessionHostsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/StartMenuItemsRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/StartMenuItemsRestOperations.cs index 59ad7daeacfe..e5262711d2b8 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/StartMenuItemsRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/StartMenuItemsRestOperations.cs @@ -33,7 +33,7 @@ public StartMenuItemsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/UserSessionsRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/UserSessionsRestOperations.cs index 0d7d526f9dec..61f1b968faf9 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/UserSessionsRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/UserSessionsRestOperations.cs @@ -33,7 +33,7 @@ public UserSessionsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/WorkspacesRestOperations.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/WorkspacesRestOperations.cs index bd7ea12135d3..601bee801ff2 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/WorkspacesRestOperations.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/RestOperations/WorkspacesRestOperations.cs @@ -33,7 +33,7 @@ public WorkspacesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-05"; + _apiVersion = apiVersion ?? "2023-10-04-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/autorest.md b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/autorest.md index 9b2b3c69e9ca..3a00b90b1d30 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/autorest.md +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/autorest.md @@ -9,7 +9,7 @@ generate-model-factory: true csharp: true library-name: DesktopVirtualization namespace: Azure.ResourceManager.DesktopVirtualization -require: https://github.com/Azure/azure-rest-api-specs/blob/9d449f35c2a8707d446a86d80c3732c909b1872f/specification/desktopvirtualization/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/desktopvirtualization/resource-manager/readme.md # tag: package-2023-09 output-folder: $(this-folder)/Generated clear-output-folder: true