diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index afd95058f9fb..07e6c1cecbb0 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -371,7 +371,7 @@ com.azure.resourcemanager:azure-resourcemanager-extendedlocation;1.0.0-beta.2;1. com.azure.resourcemanager:azure-resourcemanager-logz;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-storagepool;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-dataprotection;1.1.0;1.2.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-desktopvirtualization;1.0.0;1.1.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-desktopvirtualization;1.0.0;1.1.0 com.azure.resourcemanager:azure-resourcemanager-loadtesting;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-automanage;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-edgeorder;1.0.0-beta.1;1.0.0-beta.2 diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md index f4a85ecf6455..fb72d4492a68 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md @@ -1,14 +1,122 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0 (2023-10-16) + +- Azure Resource Manager DesktopVirtualization client library for Java. This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. Package tag package-2023-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.PrivateEndpointConnectionWithSystemData` was added + +* `models.PrivateEndpointConnectionProvisioningState` was added + +* `models.ScalingPlanPersonalSchedule$UpdateStages` was added + +* `models.ScalingPlanPersonalSchedule` was added + +* `models.ScalingPlanPersonalSchedule$Definition` was added + +* `models.SetStartVMOnConnect` was added + +* `models.PrivateEndpoint` was added + +* `models.ScalingPlanPersonalScheduleList` was added + +* `models.PrivateLinkResources` was added + +* `models.SessionHandlingOperation` was added + +* `models.ScalingPlanPersonalSchedule$DefinitionStages` was added + +* `models.PrivateEndpointConnections` was added + +* `models.ScalingPlanPersonalSchedule$Update` was added + +* `models.PrivateLinkResource` was added + +* `models.PrivateEndpointConnection` was added + +* `models.HostpoolPublicNetworkAccess` was added + +* `models.ScalingPlanPersonalSchedules` was added + +* `models.StartupBehavior` was added + +* `models.PrivateLinkServiceConnectionState` was added + +* `models.PrivateLinkResourceListResult` was added + +* `models.PrivateEndpointServiceConnectionStatus` was added + +* `models.PrivateEndpointConnectionListResultWithSystemData` was added + +* `models.ScalingPlanPersonalSchedulePatch` was added + +* `models.PublicNetworkAccess` was added + +#### `models.HostPool$Update` was modified + +* `withPublicNetworkAccess(models.HostpoolPublicNetworkAccess)` was added + +#### `models.WorkspacePatch` was modified + +* `publicNetworkAccess()` was added +* `withPublicNetworkAccess(models.PublicNetworkAccess)` was added + +#### `models.Workspace` was modified + +* `publicNetworkAccess()` was added +* `privateEndpointConnections()` was added + +#### `models.ApplicationGroup` was modified + +* `showInFeed()` was added + +#### `models.HostPool` was modified + +* `publicNetworkAccess()` was added +* `privateEndpointConnections()` was added + +#### `models.HostPoolPatch` was modified + +* `withPublicNetworkAccess(models.HostpoolPublicNetworkAccess)` was added +* `publicNetworkAccess()` was added + +#### `models.HostPoolProperties` was modified + +* `privateEndpointConnections()` was added +* `publicNetworkAccess()` was added + +#### `DesktopVirtualizationManager` was modified + +* `scalingPlanPersonalSchedules()` was added +* `privateEndpointConnections()` was added +* `privateLinkResources()` was added + +#### `models.ApplicationGroup$Definition` was modified + +* `withShowInFeed(java.lang.Boolean)` was added + +#### `models.ApplicationGroupPatch` was modified + +* `withShowInFeed(java.lang.Boolean)` was added +* `showInFeed()` was added + +#### `models.HostPool$Definition` was modified + +* `withPublicNetworkAccess(models.HostpoolPublicNetworkAccess)` was added + +#### `models.Workspace$Update` was modified + +* `withPublicNetworkAccess(models.PublicNetworkAccess)` was added + +#### `models.Workspace$Definition` was modified + +* `withPublicNetworkAccess(models.PublicNetworkAccess)` was added -### Bugs Fixed +#### `models.ApplicationGroup$Update` was modified -### Other Changes +* `withShowInFeed(java.lang.Boolean)` was added ## 1.0.0 (2023-03-20) diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/README.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/README.md index d6ca4c7be8d2..b875cc8927bb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/README.md +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/README.md @@ -2,7 +2,7 @@ Azure Resource Manager DesktopVirtualization client library for Java. -This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. Package tag package-2022-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. Package tag package-2023-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-desktopvirtualization - 1.0.0 + 1.1.0 ``` [//]: # ({x-version-update-end}) @@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fdesktopvirtualization%2Fazure-resourcemanager-desktopvirtualization%2FREADME.png) diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md index b084c5562c95..02e1653efaad 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md @@ -50,6 +50,30 @@ - [List](#operations_list) +## PrivateEndpointConnections + +- [DeleteByHostPool](#privateendpointconnections_deletebyhostpool) +- [DeleteByWorkspace](#privateendpointconnections_deletebyworkspace) +- [GetByHostPool](#privateendpointconnections_getbyhostpool) +- [GetByWorkspace](#privateendpointconnections_getbyworkspace) +- [ListByHostPool](#privateendpointconnections_listbyhostpool) +- [ListByWorkspace](#privateendpointconnections_listbyworkspace) +- [UpdateByHostPool](#privateendpointconnections_updatebyhostpool) +- [UpdateByWorkspace](#privateendpointconnections_updatebyworkspace) + +## PrivateLinkResources + +- [ListByHostPool](#privatelinkresources_listbyhostpool) +- [ListByWorkspace](#privatelinkresources_listbyworkspace) + +## ScalingPlanPersonalSchedules + +- [Create](#scalingplanpersonalschedules_create) +- [Delete](#scalingplanpersonalschedules_delete) +- [Get](#scalingplanpersonalschedules_get) +- [List](#scalingplanpersonalschedules_list) +- [Update](#scalingplanpersonalschedules_update) + ## ScalingPlanPooledSchedules - [Create](#scalingplanpooledschedules_create) @@ -106,7 +130,7 @@ import java.util.Map; /** Samples for ApplicationGroups CreateOrUpdate. */ public final class ApplicationGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Create.json */ /** * Sample code: ApplicationGroup_Create. @@ -126,9 +150,11 @@ public final class ApplicationGroupsCreateOrUpdateSamples { .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") + .withShowInFeed(true) .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -148,7 +174,7 @@ public final class ApplicationGroupsCreateOrUpdateSamples { /** Samples for ApplicationGroups Delete. */ public final class ApplicationGroupsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Delete.json */ /** * Sample code: ApplicationGroup_Delete. @@ -170,7 +196,7 @@ public final class ApplicationGroupsDeleteSamples { /** Samples for ApplicationGroups GetByResourceGroup. */ public final class ApplicationGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Get.json */ /** * Sample code: ApplicationGroup_Get. @@ -192,7 +218,7 @@ public final class ApplicationGroupsGetByResourceGroupSamples { /** Samples for ApplicationGroups List. */ public final class ApplicationGroupsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_ListBySubscription.json */ /** * Sample code: ApplicationGroup_List. @@ -212,7 +238,7 @@ public final class ApplicationGroupsListSamples { /** Samples for ApplicationGroups ListByResourceGroup. */ public final class ApplicationGroupsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_ListByResourceGroup.json */ /** * Sample code: ApplicationGroup_ListByResourceGroup. @@ -244,7 +270,7 @@ import java.util.Map; /** Samples for ApplicationGroups Update. */ public final class ApplicationGroupsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Update.json */ /** * Sample code: ApplicationGroups_Update. @@ -263,9 +289,11 @@ public final class ApplicationGroupsUpdateSamples { .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") + .withShowInFeed(true) .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -287,7 +315,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting /** Samples for Applications CreateOrUpdate. */ public final class ApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Create.json */ /** * Sample code: Application_Create. @@ -319,7 +347,7 @@ public final class ApplicationsCreateOrUpdateSamples { /** Samples for Applications Delete. */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Delete.json */ /** * Sample code: Application_Delete. @@ -342,7 +370,7 @@ public final class ApplicationsDeleteSamples { /** Samples for Applications Get. */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Get.json */ /** * Sample code: Application_Get. @@ -364,7 +392,7 @@ public final class ApplicationsGetSamples { /** Samples for Applications List. */ public final class ApplicationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_List.json */ /** * Sample code: Applications_List. @@ -390,7 +418,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationT /** Samples for Applications Update. */ public final class ApplicationsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Update.json */ /** * Sample code: Application_Update. @@ -427,7 +455,7 @@ public final class ApplicationsUpdateSamples { /** Samples for Desktops Get. */ public final class DesktopsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Desktop_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Get.json */ /** * Sample code: Desktop_Get. @@ -449,7 +477,7 @@ public final class DesktopsGetSamples { /** Samples for Desktops List. */ public final class DesktopsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Desktop_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_List.json */ /** * Sample code: Desktop_List. @@ -471,7 +499,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.DesktopPatch; /** Samples for Desktops Update. */ public final class DesktopsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Desktop_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Update.json */ /** * Sample code: Desktop_Update. @@ -514,7 +542,7 @@ import java.util.Map; /** Samples for HostPools CreateOrUpdate. */ public final class HostPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Create.json */ /** * Sample code: HostPool_Create. @@ -559,6 +587,7 @@ public final class HostPoolsCreateOrUpdateSamples { .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -578,7 +607,7 @@ public final class HostPoolsCreateOrUpdateSamples { /** Samples for HostPools Delete. */ public final class HostPoolsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Delete.json */ /** * Sample code: HostPool_Delete. @@ -598,7 +627,7 @@ public final class HostPoolsDeleteSamples { /** Samples for HostPools GetByResourceGroup. */ public final class HostPoolsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Get.json */ /** * Sample code: HostPool_Get. @@ -620,7 +649,7 @@ public final class HostPoolsGetByResourceGroupSamples { /** Samples for HostPools List. */ public final class HostPoolsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_List.json */ /** * Sample code: HostPool_List. @@ -640,7 +669,7 @@ public final class HostPoolsListSamples { /** Samples for HostPools ListByResourceGroup. */ public final class HostPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_ListByResourceGroup.json */ /** * Sample code: HostPool_ListByResourceGroup. @@ -660,7 +689,7 @@ public final class HostPoolsListByResourceGroupSamples { /** Samples for HostPools RetrieveRegistrationToken. */ public final class HostPoolsRetrieveRegistrationTokenSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPools_RetrieveRegistrationToken_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPools_RetrieveRegistrationToken_Post.json */ /** * Sample code: HostPools_RetrieveRegistrationToken_Post. @@ -697,7 +726,7 @@ import java.util.Map; /** Samples for HostPools Update. */ public final class HostPoolsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Update.json */ /** * Sample code: HostPool_Update. @@ -742,6 +771,7 @@ public final class HostPoolsUpdateSamples { .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -763,7 +793,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.MsixImageUri; /** Samples for MsixImages Expand. */ public final class MsixImagesExpandSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixImage_Expand_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixImage_Expand_Post.json */ /** * Sample code: MsixImage_Expand. @@ -794,7 +824,7 @@ import java.util.Arrays; /** Samples for MsixPackages CreateOrUpdate. */ public final class MsixPackagesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Create.json */ /** * Sample code: MSIXPackage_Create. @@ -845,7 +875,7 @@ public final class MsixPackagesCreateOrUpdateSamples { /** Samples for MsixPackages Delete. */ public final class MsixPackagesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Delete.json */ /** * Sample code: MSIXPackage_Delete. @@ -867,7 +897,7 @@ public final class MsixPackagesDeleteSamples { /** Samples for MsixPackages Get. */ public final class MsixPackagesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Get.json */ /** * Sample code: MSIXPackage_Get. @@ -889,7 +919,7 @@ public final class MsixPackagesGetSamples { /** Samples for MsixPackages List. */ public final class MsixPackagesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_List.json */ /** * Sample code: MSIXPackage_List. @@ -911,7 +941,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.MsixPackage; /** Samples for MsixPackages Update. */ public final class MsixPackagesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Update.json */ /** * Sample code: MSIXPackage_Update. @@ -936,7 +966,7 @@ public final class MsixPackagesUpdateSamples { /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/OperationDescription_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/OperationDescription_List.json */ /** * Sample code: OperationDescription_List. @@ -950,6 +980,450 @@ public final class OperationsListSamples { } ``` +### PrivateEndpointConnections_DeleteByHostPool + +```java +/** Samples for PrivateEndpointConnections DeleteByHostPool. */ +public final class PrivateEndpointConnectionsDeleteByHostPoolSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_DeleteByHostPool.json + */ + /** + * Sample code: PrivateEndpointConnection_DeleteByHostPool. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionDeleteByHostPool( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .deleteByHostPoolWithResponse( + "resourceGroup1", + "hostPool1", + "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_DeleteByWorkspace + +```java +/** Samples for PrivateEndpointConnections DeleteByWorkspace. */ +public final class PrivateEndpointConnectionsDeleteByWorkspaceSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_DeleteByWorkspace.json + */ + /** + * Sample code: PrivateEndpointConnection_DeleteByWorkspace. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionDeleteByWorkspace( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .deleteByWorkspaceWithResponse( + "resourceGroup1", + "workspace1", + "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_GetByHostPool + +```java +/** Samples for PrivateEndpointConnections GetByHostPool. */ +public final class PrivateEndpointConnectionsGetByHostPoolSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByHostPool.json + */ + /** + * Sample code: PrivateEndpointConnection_GetByHostPool. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionGetByHostPool( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .getByHostPoolWithResponse( + "resourceGroup1", + "hostPool1", + "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_GetByWorkspace + +```java +/** Samples for PrivateEndpointConnections GetByWorkspace. */ +public final class PrivateEndpointConnectionsGetByWorkspaceSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByWorkspace.json + */ + /** + * Sample code: PrivateEndpointConnection_GetByWorkspace. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionGetByWorkspace( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .getByWorkspaceWithResponse( + "resourceGroup1", + "workspace1", + "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_ListByHostPool + +```java +/** Samples for PrivateEndpointConnections ListByHostPool. */ +public final class PrivateEndpointConnectionsListByHostPoolSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_ListByHostPool.json + */ + /** + * Sample code: PrivateEndpointConnection_ListByHostPool. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionListByHostPool( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .listByHostPool("resourceGroup1", "hostPool1", null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_ListByWorkspace + +```java +/** Samples for PrivateEndpointConnections ListByWorkspace. */ +public final class PrivateEndpointConnectionsListByWorkspaceSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_ListByWorkspace.json + */ + /** + * Sample code: PrivateEndpointConnection_ListByWorkspace. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionListByWorkspace( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .listByWorkspace("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_UpdateByHostPool + +```java +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; + +/** Samples for PrivateEndpointConnections UpdateByHostPool. */ +public final class PrivateEndpointConnectionsUpdateByHostPoolSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_UpdateByHostPool.json + */ + /** + * Sample code: PrivateEndpointConnection_UpdateByHostPool. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionUpdateByHostPool( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .updateByHostPoolWithResponse( + "resourceGroup1", + "hostPool1", + "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + new PrivateEndpointConnection() + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Approved by admin@consoto.com") + .withActionsRequired("None")), + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_UpdateByWorkspace + +```java +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; + +/** Samples for PrivateEndpointConnections UpdateByWorkspace. */ +public final class PrivateEndpointConnectionsUpdateByWorkspaceSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_UpdateByWorkspace.json + */ + /** + * Sample code: PrivateEndpointConnection_UpdateByWorkspace. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionUpdateByWorkspace( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .updateByWorkspaceWithResponse( + "resourceGroup1", + "workspace1", + "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + new PrivateEndpointConnection() + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Approved by admin@consoto.com") + .withActionsRequired("None")), + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateLinkResources_ListByHostPool + +```java +/** Samples for PrivateLinkResources ListByHostPool. */ +public final class PrivateLinkResourcesListByHostPoolSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateLinkResources_ListByHostPool.json + */ + /** + * Sample code: PrivateLinkResources_ListByHostPool. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateLinkResourcesListByHostPool( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateLinkResources() + .listByHostPool("resourceGroup1", "hostPool1", null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateLinkResources_ListByWorkspace + +```java +/** Samples for PrivateLinkResources ListByWorkspace. */ +public final class PrivateLinkResourcesListByWorkspaceSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateLinkResources_ListByWorkspace.json + */ + /** + * Sample code: PrivateLinkResources_ListByWorkspace. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateLinkResourcesListByWorkspace( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateLinkResources() + .listByWorkspace("resourceGroup1", "workspace1", null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### ScalingPlanPersonalSchedules_Create + +```java +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; +import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import java.util.Arrays; + +/** Samples for ScalingPlanPersonalSchedules Create. */ +public final class ScalingPlanPersonalSchedulesCreateSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Create.json + */ + /** + * Sample code: ScalingPlanPersonalSchedules_Create. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPersonalSchedulesCreate( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPersonalSchedules() + .define("scalingPlanScheduleWeekdays1") + .withExistingScalingPlan("resourceGroup1", "scalingPlan1") + .withDaysOfWeek( + Arrays + .asList( + DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY)) + .withRampUpStartTime(new Time().withHour(6).withMinute(0)) + .withRampUpAutoStartHosts(StartupBehavior.ALL) + .withRampUpStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withRampUpActionOnDisconnect(SessionHandlingOperation.NONE) + .withRampUpMinutesToWaitOnDisconnect(10) + .withRampUpActionOnLogoff(SessionHandlingOperation.NONE) + .withRampUpMinutesToWaitOnLogoff(10) + .withPeakStartTime(new Time().withHour(8).withMinute(0)) + .withPeakStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withPeakActionOnDisconnect(SessionHandlingOperation.NONE) + .withPeakMinutesToWaitOnDisconnect(10) + .withPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withPeakMinutesToWaitOnLogoff(10) + .withRampDownStartTime(new Time().withHour(18).withMinute(0)) + .withRampDownStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withRampDownActionOnDisconnect(SessionHandlingOperation.NONE) + .withRampDownMinutesToWaitOnDisconnect(10) + .withRampDownActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withRampDownMinutesToWaitOnLogoff(10) + .withOffPeakStartTime(new Time().withHour(20).withMinute(0)) + .withOffPeakStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withOffPeakActionOnDisconnect(SessionHandlingOperation.NONE) + .withOffPeakMinutesToWaitOnDisconnect(10) + .withOffPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withOffPeakMinutesToWaitOnLogoff(10) + .create(); + } +} +``` + +### ScalingPlanPersonalSchedules_Delete + +```java +/** Samples for ScalingPlanPersonalSchedules Delete. */ +public final class ScalingPlanPersonalSchedulesDeleteSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Delete.json + */ + /** + * Sample code: ScalingPlanPersonalSchedules_Delete. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPersonalSchedulesDelete( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPersonalSchedules() + .deleteWithResponse( + "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE); + } +} +``` + +### ScalingPlanPersonalSchedules_Get + +```java +/** Samples for ScalingPlanPersonalSchedules Get. */ +public final class ScalingPlanPersonalSchedulesGetSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Get.json + */ + /** + * Sample code: ScalingPlanPersonalSchedules_Get. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPersonalSchedulesGet( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPersonalSchedules() + .getWithResponse( + "resourceGroup1", + "PersonalScalingPlan1", + "PersonalScalingPlanSchedule", + com.azure.core.util.Context.NONE); + } +} +``` + +### ScalingPlanPersonalSchedules_List + +```java +/** Samples for ScalingPlanPersonalSchedules List. */ +public final class ScalingPlanPersonalSchedulesListSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_List.json + */ + /** + * Sample code: ScalingPlanPersonalSchedules_List. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPersonalSchedulesList( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPersonalSchedules() + .list("resourceGroup1", "scalingPlan", 10, true, 0, com.azure.core.util.Context.NONE); + } +} +``` + +### ScalingPlanPersonalSchedules_Update + +```java +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedule; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; +import com.azure.resourcemanager.desktopvirtualization.models.Time; + +/** Samples for ScalingPlanPersonalSchedules Update. */ +public final class ScalingPlanPersonalSchedulesUpdateSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Update.json + */ + /** + * Sample code: ScalingPlanPersonalSchedules_Update. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPersonalSchedulesUpdate( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + ScalingPlanPersonalSchedule resource = + manager + .scalingPlanPersonalSchedules() + .getWithResponse( + "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withPeakStartTime(new Time().withHour(8).withMinute(0)) + .withPeakActionOnDisconnect(SessionHandlingOperation.NONE) + .withPeakMinutesToWaitOnDisconnect(10) + .withPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withPeakMinutesToWaitOnLogoff(10) + .withRampDownStartTime(new Time().withHour(18).withMinute(0)) + .withRampDownActionOnDisconnect(SessionHandlingOperation.NONE) + .withRampDownMinutesToWaitOnDisconnect(10) + .withRampDownActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withRampDownMinutesToWaitOnLogoff(10) + .withOffPeakStartTime(new Time().withHour(20).withMinute(0)) + .withOffPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) + .withOffPeakActionOnDisconnect(SessionHandlingOperation.NONE) + .withOffPeakMinutesToWaitOnDisconnect(10) + .withOffPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withOffPeakMinutesToWaitOnLogoff(10) + .apply(); + } +} +``` + ### ScalingPlanPooledSchedules_Create ```java @@ -961,7 +1435,7 @@ import java.util.Arrays; /** Samples for ScalingPlanPooledSchedules Create. */ public final class ScalingPlanPooledSchedulesCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Create.json */ /** * Sample code: ScalingPlanPooledSchedules_Create. @@ -1004,7 +1478,7 @@ public final class ScalingPlanPooledSchedulesCreateSamples { /** Samples for ScalingPlanPooledSchedules Delete. */ public final class ScalingPlanPooledSchedulesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Delete.json */ /** * Sample code: ScalingPlanPooledSchedules_Delete. @@ -1027,7 +1501,7 @@ public final class ScalingPlanPooledSchedulesDeleteSamples { /** Samples for ScalingPlanPooledSchedules Get. */ public final class ScalingPlanPooledSchedulesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Get.json */ /** * Sample code: ScalingPlanPooledSchedules_Get. @@ -1050,7 +1524,7 @@ public final class ScalingPlanPooledSchedulesGetSamples { /** Samples for ScalingPlanPooledSchedules List. */ public final class ScalingPlanPooledSchedulesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_List.json */ /** * Sample code: ScalingPlanPooledSchedules_List. @@ -1078,7 +1552,7 @@ import java.util.Arrays; /** Samples for ScalingPlanPooledSchedules Update. */ public final class ScalingPlanPooledSchedulesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Update.json */ /** * Sample code: ScalingPlanPooledSchedules_Update. @@ -1126,7 +1600,7 @@ import java.util.Map; /** Samples for ScalingPlans Create. */ public final class ScalingPlansCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Create.json */ /** * Sample code: ScalingPlans_Create. @@ -1184,6 +1658,7 @@ public final class ScalingPlansCreateSamples { .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1203,7 +1678,7 @@ public final class ScalingPlansCreateSamples { /** Samples for ScalingPlans Delete. */ public final class ScalingPlansDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Delete.json */ /** * Sample code: ScalingPlans_Delete. @@ -1225,7 +1700,7 @@ public final class ScalingPlansDeleteSamples { /** Samples for ScalingPlans GetByResourceGroup. */ public final class ScalingPlansGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Get.json */ /** * Sample code: ScalingPlans_Get. @@ -1247,7 +1722,7 @@ public final class ScalingPlansGetByResourceGroupSamples { /** Samples for ScalingPlans List. */ public final class ScalingPlansListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListBySubscription.json */ /** * Sample code: ScalingPlans_ListBySubscription. @@ -1267,7 +1742,7 @@ public final class ScalingPlansListSamples { /** Samples for ScalingPlans ListByHostPool. */ public final class ScalingPlansListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListByHostPool.json */ /** * Sample code: ScalingPlan_ListByHostPool. @@ -1289,7 +1764,7 @@ public final class ScalingPlansListByHostPoolSamples { /** Samples for ScalingPlans ListByResourceGroup. */ public final class ScalingPlansListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListByResourceGroup.json */ /** * Sample code: ScalingPlans_ListByResourceGroup. @@ -1311,7 +1786,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlan; /** Samples for ScalingPlans Update. */ public final class ScalingPlansUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Update.json */ /** * Sample code: ScalingPlans_Update. @@ -1336,7 +1811,7 @@ public final class ScalingPlansUpdateSamples { /** Samples for SessionHosts Delete. */ public final class SessionHostsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/SessionHost_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Delete.json */ /** * Sample code: SessionHost_Delete. @@ -1359,7 +1834,7 @@ public final class SessionHostsDeleteSamples { /** Samples for SessionHosts Get. */ public final class SessionHostsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/SessionHost_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Get.json */ /** * Sample code: SessionHost_Get. @@ -1382,7 +1857,7 @@ public final class SessionHostsGetSamples { /** Samples for SessionHosts List. */ public final class SessionHostsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/SessionHost_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_List.json */ /** * Sample code: SessionHost_List. @@ -1404,7 +1879,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.SessionHostPatch; /** Samples for SessionHosts Update. */ public final class SessionHostsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/SessionHost_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Update.json */ /** * Sample code: SessionHost_Update. @@ -1435,7 +1910,7 @@ public final class SessionHostsUpdateSamples { /** Samples for StartMenuItems List. */ public final class StartMenuItemsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/StartMenuItem_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/StartMenuItem_List.json */ /** * Sample code: StartMenuItem_List. @@ -1457,7 +1932,7 @@ public final class StartMenuItemsListSamples { /** Samples for UserSessions Delete. */ public final class UserSessionsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Delete.json */ /** * Sample code: UserSession_Delete. @@ -1485,7 +1960,7 @@ public final class UserSessionsDeleteSamples { /** Samples for UserSessions Disconnect. */ public final class UserSessionsDisconnectSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_Disconnect_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Disconnect_Post.json */ /** * Sample code: UserSession_Disconnect_Post. @@ -1508,7 +1983,7 @@ public final class UserSessionsDisconnectSamples { /** Samples for UserSessions Get. */ public final class UserSessionsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Get.json */ /** * Sample code: UserSession_Get. @@ -1531,7 +2006,7 @@ public final class UserSessionsGetSamples { /** Samples for UserSessions List. */ public final class UserSessionsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_List.json */ /** * Sample code: UserSession_List. @@ -1560,7 +2035,7 @@ public final class UserSessionsListSamples { /** Samples for UserSessions ListByHostPool. */ public final class UserSessionsListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_ListByHostPool.json */ /** * Sample code: UserSession_ListByHostPool. @@ -1591,7 +2066,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.SendMessage; /** Samples for UserSessions SendMessage. */ public final class UserSessionsSendMessageSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_SendMessage_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_SendMessage_Post.json */ /** * Sample code: UserSession_SendMessage_Post. @@ -1622,7 +2097,7 @@ import java.util.Map; /** Samples for Workspaces CreateOrUpdate. */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Create.json */ /** * Sample code: Workspace_Create. @@ -1642,6 +2117,7 @@ public final class WorkspacesCreateOrUpdateSamples { .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1661,7 +2137,7 @@ public final class WorkspacesCreateOrUpdateSamples { /** Samples for Workspaces Delete. */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Delete.json */ /** * Sample code: Workspace_Delete. @@ -1683,7 +2159,7 @@ public final class WorkspacesDeleteSamples { /** Samples for Workspaces GetByResourceGroup. */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Get.json */ /** * Sample code: Workspace_Get. @@ -1705,7 +2181,7 @@ public final class WorkspacesGetByResourceGroupSamples { /** Samples for Workspaces List. */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_ListBySubscription.json */ /** * Sample code: Workspace_ListBySubscription. @@ -1725,7 +2201,7 @@ public final class WorkspacesListSamples { /** Samples for Workspaces ListByResourceGroup. */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_ListByResourceGroup.json */ /** * Sample code: Workspace_ListByResourceGroup. @@ -1749,7 +2225,7 @@ import java.util.Map; /** Samples for Workspaces Update. */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Update.json */ /** * Sample code: Workspace_Update. @@ -1771,6 +2247,7 @@ public final class WorkspacesUpdateSamples { .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml index a9a185b7110f..bdbf2ebee8c5 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-desktopvirtualization - 1.1.0-beta.1 + 1.1.0 jar Microsoft Azure SDK for DesktopVirtualization Management - This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2022-09. + This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-09. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/DesktopVirtualizationManager.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/DesktopVirtualizationManager.java index 2bc9fc7c2a4d..0a090c871fac 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/DesktopVirtualizationManager.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/DesktopVirtualizationManager.java @@ -32,6 +32,9 @@ import com.azure.resourcemanager.desktopvirtualization.implementation.MsixImagesImpl; import com.azure.resourcemanager.desktopvirtualization.implementation.MsixPackagesImpl; import com.azure.resourcemanager.desktopvirtualization.implementation.OperationsImpl; +import com.azure.resourcemanager.desktopvirtualization.implementation.PrivateEndpointConnectionsImpl; +import com.azure.resourcemanager.desktopvirtualization.implementation.PrivateLinkResourcesImpl; +import com.azure.resourcemanager.desktopvirtualization.implementation.ScalingPlanPersonalSchedulesImpl; import com.azure.resourcemanager.desktopvirtualization.implementation.ScalingPlanPooledSchedulesImpl; import com.azure.resourcemanager.desktopvirtualization.implementation.ScalingPlansImpl; import com.azure.resourcemanager.desktopvirtualization.implementation.SessionHostsImpl; @@ -45,6 +48,9 @@ import com.azure.resourcemanager.desktopvirtualization.models.MsixImages; import com.azure.resourcemanager.desktopvirtualization.models.MsixPackages; import com.azure.resourcemanager.desktopvirtualization.models.Operations; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnections; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResources; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedules; import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedules; import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlans; import com.azure.resourcemanager.desktopvirtualization.models.SessionHosts; @@ -64,10 +70,16 @@ public final class DesktopVirtualizationManager { private Workspaces workspaces; + private PrivateEndpointConnections privateEndpointConnections; + + private PrivateLinkResources privateLinkResources; + private ScalingPlans scalingPlans; private ScalingPlanPooledSchedules scalingPlanPooledSchedules; + private ScalingPlanPersonalSchedules scalingPlanPersonalSchedules; + private ApplicationGroups applicationGroups; private StartMenuItems startMenuItems; @@ -252,7 +264,7 @@ public DesktopVirtualizationManager authenticate(TokenCredential credential, Azu .append("-") .append("com.azure.resourcemanager.desktopvirtualization") .append("/") - .append("1.0.0"); + .append("1.1.0"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -333,6 +345,31 @@ public Workspaces workspaces() { return workspaces; } + /** + * Gets the resource collection API of PrivateEndpointConnections. + * + * @return Resource collection API of PrivateEndpointConnections. + */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections = + new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + } + return privateEndpointConnections; + } + + /** + * Gets the resource collection API of PrivateLinkResources. + * + * @return Resource collection API of PrivateLinkResources. + */ + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + } + return privateLinkResources; + } + /** * Gets the resource collection API of ScalingPlans. It manages ScalingPlan. * @@ -358,6 +395,19 @@ public ScalingPlanPooledSchedules scalingPlanPooledSchedules() { return scalingPlanPooledSchedules; } + /** + * Gets the resource collection API of ScalingPlanPersonalSchedules. It manages ScalingPlanPersonalSchedule. + * + * @return Resource collection API of ScalingPlanPersonalSchedules. + */ + public ScalingPlanPersonalSchedules scalingPlanPersonalSchedules() { + if (this.scalingPlanPersonalSchedules == null) { + this.scalingPlanPersonalSchedules = + new ScalingPlanPersonalSchedulesImpl(clientObject.getScalingPlanPersonalSchedules(), this); + } + return scalingPlanPersonalSchedules; + } + /** * Gets the resource collection API of ApplicationGroups. It manages ApplicationGroup. * @@ -467,8 +517,10 @@ public MsixImages msixImages() { } /** - * @return Wrapped service client DesktopVirtualizationApiClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. + * Gets wrapped service client DesktopVirtualizationApiClient providing direct access to the underlying + * auto-generated API implementation, based on Azure REST API. + * + * @return Wrapped service client DesktopVirtualizationApiClient. */ public DesktopVirtualizationApiClient serviceClient() { return this.clientObject; diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopVirtualizationApiClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopVirtualizationApiClient.java index 877f5e0a06fb..8a128c96020d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopVirtualizationApiClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopVirtualizationApiClient.java @@ -58,6 +58,20 @@ public interface DesktopVirtualizationApiClient { */ WorkspacesClient getWorkspaces(); + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + PrivateLinkResourcesClient getPrivateLinkResources(); + /** * Gets the ScalingPlansClient object to access its operations. * @@ -72,6 +86,13 @@ public interface DesktopVirtualizationApiClient { */ ScalingPlanPooledSchedulesClient getScalingPlanPooledSchedules(); + /** + * Gets the ScalingPlanPersonalSchedulesClient object to access its operations. + * + * @return the ScalingPlanPersonalSchedulesClient object. + */ + ScalingPlanPersonalSchedulesClient getScalingPlanPersonalSchedules(); + /** * Gets the ApplicationGroupsClient object to access its operations. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateEndpointConnectionsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateEndpointConnectionsClient.java new file mode 100644 index 000000000000..b0fe67f7c09f --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateEndpointConnectionsClient.java @@ -0,0 +1,558 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +public interface PrivateEndpointConnectionsClient { + /** + * List private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByWorkspaceAsync( + String resourceGroupName, String workspaceName); + + /** + * List private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkspace( + String resourceGroupName, String workspaceName); + + /** + * List private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkspace( + String resourceGroupName, String workspaceName, Context context); + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByWorkspaceWithResponseAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getByWorkspaceAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionWithSystemDataInner getByWorkspace( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteByWorkspaceWithResponseAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteByWorkspaceAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteByWorkspace(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateByWorkspaceWithResponseAsync( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection); + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateByWorkspaceAsync( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection); + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateByWorkspaceWithResponse( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection, + Context context); + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionWithSystemDataInner updateByWorkspace( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection); + + /** + * List private endpoint connections associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip); + + /** + * List private endpoint connections associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName); + + /** + * List private endpoint connections associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByHostPool( + String resourceGroupName, String hostPoolName); + + /** + * List private endpoint connections associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByHostPoolWithResponseAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getByHostPoolAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionWithSystemDataInner getByHostPool( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteByHostPoolWithResponseAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteByHostPoolAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteByHostPool(String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateByHostPoolWithResponseAsync( + String resourceGroupName, + String hostPoolName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection); + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateByHostPoolAsync( + String resourceGroupName, + String hostPoolName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection); + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateByHostPoolWithResponse( + String resourceGroupName, + String hostPoolName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection, + Context context); + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionWithSystemDataInner updateByHostPool( + String resourceGroupName, + String hostPoolName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateLinkResourcesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateLinkResourcesClient.java new file mode 100644 index 000000000000..07b8dda0897c --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateLinkResourcesClient.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; + +/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +public interface PrivateLinkResourcesClient { + /** + * List the private link resources available for this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByWorkspaceAsync( + String resourceGroupName, String workspaceName, Integer pageSize, Boolean isDescending, Integer initialSkip); + + /** + * List the private link resources available for this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName); + + /** + * List the private link resources available for this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); + + /** + * List the private link resources available for this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkspace( + String resourceGroupName, + String workspaceName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip); + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName); + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByHostPool(String resourceGroupName, String hostPoolName); + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPersonalSchedulesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPersonalSchedulesClient.java new file mode 100644 index 000000000000..011294d506d9 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPersonalSchedulesClient.java @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedulePatch; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ScalingPlanPersonalSchedulesClient. */ +public interface ScalingPlanPersonalSchedulesClient { + /** + * Get a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPersonalSchedule along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * Get a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPersonalSchedule on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * Get a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPersonalSchedule along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context); + + /** + * Get a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPersonalSchedule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScalingPlanPersonalScheduleInner get( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * Create or update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPersonalScheduleInner scalingPlanSchedule); + + /** + * Create or update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPersonalScheduleInner scalingPlanSchedule); + + /** + * Create or update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponse( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPersonalScheduleInner scalingPlanSchedule, + Context context); + + /** + * Create or update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScalingPlanPersonalScheduleInner create( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPersonalScheduleInner scalingPlanSchedule); + + /** + * Remove a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteWithResponseAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * Remove a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * Remove a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context); + + /** + * Remove a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * Update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPersonalSchedulePatch scalingPlanSchedule); + + /** + * Update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * Update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPersonalSchedulePatch scalingPlanSchedule, + Context context); + + /** + * Update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScalingPlanPersonalScheduleInner update( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * List ScalingPlanPersonalSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync( + String resourceGroupName, String scalingPlanName, Integer pageSize, Boolean isDescending, Integer initialSkip); + + /** + * List ScalingPlanPersonalSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String scalingPlanName); + + /** + * List ScalingPlanPersonalSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String scalingPlanName); + + /** + * List ScalingPlanPersonalSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String scalingPlanName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupInner.java index da8dba500011..c4f0c2085fdf 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupInner.java @@ -220,6 +220,29 @@ public Boolean cloudPcResource() { return this.innerProperties() == null ? null : this.innerProperties().cloudPcResource(); } + /** + * Get the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. + * + * @return the showInFeed value. + */ + public Boolean showInFeed() { + return this.innerProperties() == null ? null : this.innerProperties().showInFeed(); + } + + /** + * Set the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. + * + * @param showInFeed the showInFeed value to set. + * @return the ApplicationGroupInner object itself. + */ + public ApplicationGroupInner withShowInFeed(Boolean showInFeed) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationGroupProperties(); + } + this.innerProperties().withShowInFeed(showInFeed); + return this; + } + /** * Validates the instance. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupPatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupPatchProperties.java index e3d19f6baf5f..d950f7dda412 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupPatchProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupPatchProperties.java @@ -22,6 +22,12 @@ public final class ApplicationGroupPatchProperties { @JsonProperty(value = "friendlyName") private String friendlyName; + /* + * Boolean representing whether the applicationGroup is show in the feed. + */ + @JsonProperty(value = "showInFeed") + private Boolean showInFeed; + /** Creates an instance of ApplicationGroupPatchProperties class. */ public ApplicationGroupPatchProperties() { } @@ -66,6 +72,26 @@ public ApplicationGroupPatchProperties withFriendlyName(String friendlyName) { return this; } + /** + * Get the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. + * + * @return the showInFeed value. + */ + public Boolean showInFeed() { + return this.showInFeed; + } + + /** + * Set the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. + * + * @param showInFeed the showInFeed value to set. + * @return the ApplicationGroupPatchProperties object itself. + */ + public ApplicationGroupPatchProperties withShowInFeed(Boolean showInFeed) { + this.showInFeed = showInFeed; + return this; + } + /** * Validates the instance. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupProperties.java index 4973473feaaa..ddf0c382b536 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupProperties.java @@ -54,6 +54,12 @@ public final class ApplicationGroupProperties { @JsonProperty(value = "cloudPcResource", access = JsonProperty.Access.WRITE_ONLY) private Boolean cloudPcResource; + /* + * Boolean representing whether the applicationGroup is show in the feed. + */ + @JsonProperty(value = "showInFeed") + private Boolean showInFeed; + /** Creates an instance of ApplicationGroupProperties class. */ public ApplicationGroupProperties() { } @@ -165,6 +171,26 @@ public Boolean cloudPcResource() { return this.cloudPcResource; } + /** + * Get the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. + * + * @return the showInFeed value. + */ + public Boolean showInFeed() { + return this.showInFeed; + } + + /** + * Set the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. + * + * @param showInFeed the showInFeed value to set. + * @return the ApplicationGroupProperties object itself. + */ + public ApplicationGroupProperties withShowInFeed(Boolean showInFeed) { + this.showInFeed = showInFeed; + return this; + } + /** * Validates the instance. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolInner.java index 07a1c567f597..ba3ef226255a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolInner.java @@ -9,9 +9,11 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdateProperties; import com.azure.resourcemanager.desktopvirtualization.models.HostPoolType; +import com.azure.resourcemanager.desktopvirtualization.models.HostpoolPublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySet; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan; @@ -530,6 +532,31 @@ public Boolean cloudPcResource() { return this.innerProperties() == null ? null : this.innerProperties().cloudPcResource(); } + /** + * Get the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private + * networks, Disabled allows this resource to only be accessed via private endpoints. + * + * @return the publicNetworkAccess value. + */ + public HostpoolPublicNetworkAccess publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private + * networks, Disabled allows this resource to only be accessed via private endpoints. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the HostPoolInner object itself. + */ + public HostPoolInner withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new HostPoolPropertiesInner(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + /** * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack * component. @@ -555,6 +582,16 @@ public HostPoolInner withAgentUpdate(AgentUpdateProperties agentUpdate) { return this; } + /** + * Get the privateEndpointConnections property: List of private endpoint connection associated with the specified + * resource. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + } + /** * Validates the instance. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPatchProperties.java index 04851ae8d755..69441f3879f7 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPatchProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPatchProperties.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdatePatchProperties; +import com.azure.resourcemanager.desktopvirtualization.models.HostpoolPublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; @@ -112,6 +113,12 @@ public final class HostPoolPatchProperties { @JsonProperty(value = "startVMOnConnect") private Boolean startVMOnConnect; + /* + * Enabled to allow this resource to be access from the public network + */ + @JsonProperty(value = "publicNetworkAccess") + private HostpoolPublicNetworkAccess publicNetworkAccess; + /* * The session host configuration for updating agent, monitoring agent, and stack component. */ @@ -447,6 +454,26 @@ public HostPoolPatchProperties withStartVMOnConnect(Boolean startVMOnConnect) { return this; } + /** + * Get the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. + * + * @return the publicNetworkAccess value. + */ + public HostpoolPublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the HostPoolPatchProperties object itself. + */ + public HostPoolPatchProperties withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + /** * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack * component. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPropertiesInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPropertiesInner.java index b44d59b1c299..1c5a76f63204 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPropertiesInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPropertiesInner.java @@ -8,9 +8,11 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdateProperties; import com.azure.resourcemanager.desktopvirtualization.models.HostPoolType; +import com.azure.resourcemanager.desktopvirtualization.models.HostpoolPublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -138,12 +140,25 @@ public final class HostPoolPropertiesInner { @JsonProperty(value = "cloudPcResource", access = JsonProperty.Access.WRITE_ONLY) private Boolean cloudPcResource; + /* + * Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource + * to only be accessed via private endpoints + */ + @JsonProperty(value = "publicNetworkAccess") + private HostpoolPublicNetworkAccess publicNetworkAccess; + /* * The session host configuration for updating agent, monitoring agent, and stack component. */ @JsonProperty(value = "agentUpdate") private AgentUpdateProperties agentUpdate; + /* + * List of private endpoint connection associated with the specified resource + */ + @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + /** Creates an instance of HostPoolPropertiesInner class. */ public HostPoolPropertiesInner() { } @@ -520,6 +535,28 @@ public Boolean cloudPcResource() { return this.cloudPcResource; } + /** + * Get the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private + * networks, Disabled allows this resource to only be accessed via private endpoints. + * + * @return the publicNetworkAccess value. + */ + public HostpoolPublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private + * networks, Disabled allows this resource to only be accessed via private endpoints. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the HostPoolPropertiesInner object itself. + */ + public HostPoolPropertiesInner withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + /** * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack * component. @@ -542,6 +579,16 @@ public HostPoolPropertiesInner withAgentUpdate(AgentUpdateProperties agentUpdate return this; } + /** + * Get the privateEndpointConnections property: List of private endpoint connection associated with the specified + * resource. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + /** * Validates the instance. * @@ -572,6 +619,9 @@ public void validate() { if (agentUpdate() != null) { agentUpdate().validate(); } + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } } private static final ClientLogger LOGGER = new ClientLogger(HostPoolPropertiesInner.class); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateEndpointConnectionProperties.java new file mode 100644 index 000000000000..38057b464ed5 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateEndpointConnectionProperties.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of the PrivateEndpointConnectProperties. */ +@Fluent +public final class PrivateEndpointConnectionProperties { + /* + * The resource of private end point. + */ + @JsonProperty(value = "privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /* + * A collection of information about the state of the connection between service consumer and provider. + */ + @JsonProperty(value = "privateLinkServiceConnectionState", required = true) + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /* + * The provisioning state of the private endpoint connection resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointConnectionProvisioningState provisioningState; + + /** Creates an instance of PrivateEndpointConnectionProperties class. */ + public PrivateEndpointConnectionProperties() { + } + + /** + * Get the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: The resource of private end point. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property privateLinkServiceConnectionState in model" + + " PrivateEndpointConnectionProperties")); + } else { + privateLinkServiceConnectionState().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateEndpointConnectionWithSystemDataInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateEndpointConnectionWithSystemDataInner.java new file mode 100644 index 000000000000..625ff47548f1 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateEndpointConnectionWithSystemDataInner.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Private Endpoint Connection resource. */ +@Fluent +public final class PrivateEndpointConnectionWithSystemDataInner extends PrivateEndpointConnection { + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of PrivateEndpointConnectionWithSystemDataInner class. */ + public PrivateEndpointConnectionWithSystemDataInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public PrivateEndpointConnectionWithSystemDataInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + super.withPrivateEndpoint(privateEndpoint); + return this; + } + + /** {@inheritDoc} */ + @Override + public PrivateEndpointConnectionWithSystemDataInner withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + super.withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateLinkResourceInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateLinkResourceInner.java new file mode 100644 index 000000000000..bcbcdafc61ba --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateLinkResourceInner.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A private link resource. */ +@Fluent +public final class PrivateLinkResourceInner extends ProxyResource { + /* + * Resource properties. + */ + @JsonProperty(value = "properties") + private PrivateLinkResourceProperties innerProperties; + + /** Creates an instance of PrivateLinkResourceInner class. */ + public PrivateLinkResourceInner() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private PrivateLinkResourceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.innerProperties() == null ? null : this.innerProperties().groupId(); + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); + } + + /** + * Get the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); + } + + /** + * Set the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @param requiredZoneNames the requiredZoneNames value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkResourceProperties(); + } + this.innerProperties().withRequiredZoneNames(requiredZoneNames); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateLinkResourceProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateLinkResourceProperties.java new file mode 100644 index 000000000000..c6b1b9b130d0 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateLinkResourceProperties.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties of a private link resource. */ +@Fluent +public final class PrivateLinkResourceProperties { + /* + * The private link resource group id. + */ + @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) + private String groupId; + + /* + * The private link resource required member names. + */ + @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY) + private List requiredMembers; + + /* + * The private link resource Private link DNS zone name. + */ + @JsonProperty(value = "requiredZoneNames") + private List requiredZoneNames; + + /** Creates an instance of PrivateLinkResourceProperties class. */ + public PrivateLinkResourceProperties() { + } + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Get the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * Set the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @param requiredZoneNames the requiredZoneNames value to set. + * @return the PrivateLinkResourceProperties object itself. + */ + public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) { + this.requiredZoneNames = requiredZoneNames; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPersonalScheduleInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPersonalScheduleInner.java new file mode 100644 index 000000000000..96c8a3393c45 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPersonalScheduleInner.java @@ -0,0 +1,711 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; +import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Represents a ScalingPlanPersonalSchedule definition. */ +@Fluent +public final class ScalingPlanPersonalScheduleInner extends ProxyResource { + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * Detailed properties for ScalingPlanPersonalSchedule + */ + @JsonProperty(value = "properties", required = true) + private ScalingPlanPersonalScheduleProperties innerProperties = new ScalingPlanPersonalScheduleProperties(); + + /** Creates an instance of ScalingPlanPersonalScheduleInner class. */ + public ScalingPlanPersonalScheduleInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the innerProperties property: Detailed properties for ScalingPlanPersonalSchedule. + * + * @return the innerProperties value. + */ + private ScalingPlanPersonalScheduleProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the daysOfWeek property: Set of days of the week on which this schedule is active. + * + * @return the daysOfWeek value. + */ + public List daysOfWeek() { + return this.innerProperties() == null ? null : this.innerProperties().daysOfWeek(); + } + + /** + * Set the daysOfWeek property: Set of days of the week on which this schedule is active. + * + * @param daysOfWeek the daysOfWeek value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withDaysOfWeek(List daysOfWeek) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withDaysOfWeek(daysOfWeek); + return this; + } + + /** + * Get the rampUpStartTime property: Starting time for ramp up period. + * + * @return the rampUpStartTime value. + */ + public Time rampUpStartTime() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpStartTime(); + } + + /** + * Set the rampUpStartTime property: Starting time for ramp up period. + * + * @param rampUpStartTime the rampUpStartTime value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withRampUpStartTime(Time rampUpStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampUpStartTime(rampUpStartTime); + return this; + } + + /** + * Get the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for personal vms in + * the hostpool. + * + * @return the rampUpAutoStartHosts value. + */ + public StartupBehavior rampUpAutoStartHosts() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpAutoStartHosts(); + } + + /** + * Set the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for personal vms in + * the hostpool. + * + * @param rampUpAutoStartHosts the rampUpAutoStartHosts value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withRampUpAutoStartHosts(StartupBehavior rampUpAutoStartHosts) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampUpAutoStartHosts(rampUpAutoStartHosts); + return this; + } + + /** + * Get the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during + * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning + * them on manually. + * + * @return the rampUpStartVMOnConnect value. + */ + public SetStartVMOnConnect rampUpStartVMOnConnect() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpStartVMOnConnect(); + } + + /** + * Set the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during + * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning + * them on manually. + * + * @param rampUpStartVMOnConnect the rampUpStartVMOnConnect value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withRampUpStartVMOnConnect(SetStartVMOnConnect rampUpStartVMOnConnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampUpStartVMOnConnect(rampUpStartVMOnConnect); + return this; + } + + /** + * Get the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the ramp up period. + * + * @return the rampUpActionOnDisconnect value. + */ + public SessionHandlingOperation rampUpActionOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpActionOnDisconnect(); + } + + /** + * Set the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the ramp up period. + * + * @param rampUpActionOnDisconnect the rampUpActionOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withRampUpActionOnDisconnect( + SessionHandlingOperation rampUpActionOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampUpActionOnDisconnect(rampUpActionOnDisconnect); + return this; + } + + /** + * Get the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp up period. + * + * @return the rampUpMinutesToWaitOnDisconnect value. + */ + public Integer rampUpMinutesToWaitOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpMinutesToWaitOnDisconnect(); + } + + /** + * Set the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp up period. + * + * @param rampUpMinutesToWaitOnDisconnect the rampUpMinutesToWaitOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withRampUpMinutesToWaitOnDisconnect( + Integer rampUpMinutesToWaitOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampUpMinutesToWaitOnDisconnect(rampUpMinutesToWaitOnDisconnect); + return this; + } + + /** + * Get the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up period. + * + * @return the rampUpActionOnLogoff value. + */ + public SessionHandlingOperation rampUpActionOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpActionOnLogoff(); + } + + /** + * Set the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up period. + * + * @param rampUpActionOnLogoff the rampUpActionOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withRampUpActionOnLogoff(SessionHandlingOperation rampUpActionOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampUpActionOnLogoff(rampUpActionOnLogoff); + return this; + } + + /** + * Get the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp up period. + * + * @return the rampUpMinutesToWaitOnLogoff value. + */ + public Integer rampUpMinutesToWaitOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpMinutesToWaitOnLogoff(); + } + + /** + * Set the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp up period. + * + * @param rampUpMinutesToWaitOnLogoff the rampUpMinutesToWaitOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withRampUpMinutesToWaitOnLogoff(Integer rampUpMinutesToWaitOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampUpMinutesToWaitOnLogoff(rampUpMinutesToWaitOnLogoff); + return this; + } + + /** + * Get the peakStartTime property: Starting time for peak period. + * + * @return the peakStartTime value. + */ + public Time peakStartTime() { + return this.innerProperties() == null ? null : this.innerProperties().peakStartTime(); + } + + /** + * Set the peakStartTime property: Starting time for peak period. + * + * @param peakStartTime the peakStartTime value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withPeakStartTime(Time peakStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withPeakStartTime(peakStartTime); + return this; + } + + /** + * Get the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during + * the peak phase. + * + * @return the peakStartVMOnConnect value. + */ + public SetStartVMOnConnect peakStartVMOnConnect() { + return this.innerProperties() == null ? null : this.innerProperties().peakStartVMOnConnect(); + } + + /** + * Set the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during + * the peak phase. + * + * @param peakStartVMOnConnect the peakStartVMOnConnect value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withPeakStartVMOnConnect(SetStartVMOnConnect peakStartVMOnConnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withPeakStartVMOnConnect(peakStartVMOnConnect); + return this; + } + + /** + * Get the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak period. + * + * @return the peakActionOnDisconnect value. + */ + public SessionHandlingOperation peakActionOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().peakActionOnDisconnect(); + } + + /** + * Set the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak period. + * + * @param peakActionOnDisconnect the peakActionOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withPeakActionOnDisconnect( + SessionHandlingOperation peakActionOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withPeakActionOnDisconnect(peakActionOnDisconnect); + return this; + } + + /** + * Get the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired session + * handling action when a user disconnects during the peak period. + * + * @return the peakMinutesToWaitOnDisconnect value. + */ + public Integer peakMinutesToWaitOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().peakMinutesToWaitOnDisconnect(); + } + + /** + * Set the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired session + * handling action when a user disconnects during the peak period. + * + * @param peakMinutesToWaitOnDisconnect the peakMinutesToWaitOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withPeakMinutesToWaitOnDisconnect(Integer peakMinutesToWaitOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withPeakMinutesToWaitOnDisconnect(peakMinutesToWaitOnDisconnect); + return this; + } + + /** + * Get the peakActionOnLogoff property: Action to be taken after a logoff during the peak period. + * + * @return the peakActionOnLogoff value. + */ + public SessionHandlingOperation peakActionOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().peakActionOnLogoff(); + } + + /** + * Set the peakActionOnLogoff property: Action to be taken after a logoff during the peak period. + * + * @param peakActionOnLogoff the peakActionOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withPeakActionOnLogoff(SessionHandlingOperation peakActionOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withPeakActionOnLogoff(peakActionOnLogoff); + return this; + } + + /** + * Get the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the peak period. + * + * @return the peakMinutesToWaitOnLogoff value. + */ + public Integer peakMinutesToWaitOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().peakMinutesToWaitOnLogoff(); + } + + /** + * Set the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the peak period. + * + * @param peakMinutesToWaitOnLogoff the peakMinutesToWaitOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withPeakMinutesToWaitOnLogoff(Integer peakMinutesToWaitOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withPeakMinutesToWaitOnLogoff(peakMinutesToWaitOnLogoff); + return this; + } + + /** + * Get the rampDownStartTime property: Starting time for ramp down period. + * + * @return the rampDownStartTime value. + */ + public Time rampDownStartTime() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownStartTime(); + } + + /** + * Set the rampDownStartTime property: Starting time for ramp down period. + * + * @param rampDownStartTime the rampDownStartTime value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withRampDownStartTime(Time rampDownStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampDownStartTime(rampDownStartTime); + return this; + } + + /** + * Get the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the ramp down phase. + * + * @return the rampDownStartVMOnConnect value. + */ + public SetStartVMOnConnect rampDownStartVMOnConnect() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownStartVMOnConnect(); + } + + /** + * Set the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the ramp down phase. + * + * @param rampDownStartVMOnConnect the rampDownStartVMOnConnect value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withRampDownStartVMOnConnect(SetStartVMOnConnect rampDownStartVMOnConnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampDownStartVMOnConnect(rampDownStartVMOnConnect); + return this; + } + + /** + * Get the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the ramp down + * period. + * + * @return the rampDownActionOnDisconnect value. + */ + public SessionHandlingOperation rampDownActionOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownActionOnDisconnect(); + } + + /** + * Set the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the ramp down + * period. + * + * @param rampDownActionOnDisconnect the rampDownActionOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withRampDownActionOnDisconnect( + SessionHandlingOperation rampDownActionOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampDownActionOnDisconnect(rampDownActionOnDisconnect); + return this; + } + + /** + * Get the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp down period. + * + * @return the rampDownMinutesToWaitOnDisconnect value. + */ + public Integer rampDownMinutesToWaitOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownMinutesToWaitOnDisconnect(); + } + + /** + * Set the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp down period. + * + * @param rampDownMinutesToWaitOnDisconnect the rampDownMinutesToWaitOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withRampDownMinutesToWaitOnDisconnect( + Integer rampDownMinutesToWaitOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampDownMinutesToWaitOnDisconnect(rampDownMinutesToWaitOnDisconnect); + return this; + } + + /** + * Get the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down period. + * + * @return the rampDownActionOnLogoff value. + */ + public SessionHandlingOperation rampDownActionOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownActionOnLogoff(); + } + + /** + * Set the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down period. + * + * @param rampDownActionOnLogoff the rampDownActionOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withRampDownActionOnLogoff( + SessionHandlingOperation rampDownActionOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampDownActionOnLogoff(rampDownActionOnLogoff); + return this; + } + + /** + * Get the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp down period. + * + * @return the rampDownMinutesToWaitOnLogoff value. + */ + public Integer rampDownMinutesToWaitOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownMinutesToWaitOnLogoff(); + } + + /** + * Set the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp down period. + * + * @param rampDownMinutesToWaitOnLogoff the rampDownMinutesToWaitOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withRampDownMinutesToWaitOnLogoff(Integer rampDownMinutesToWaitOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampDownMinutesToWaitOnLogoff(rampDownMinutesToWaitOnLogoff); + return this; + } + + /** + * Get the offPeakStartTime property: Starting time for off-peak period. + * + * @return the offPeakStartTime value. + */ + public Time offPeakStartTime() { + return this.innerProperties() == null ? null : this.innerProperties().offPeakStartTime(); + } + + /** + * Set the offPeakStartTime property: Starting time for off-peak period. + * + * @param offPeakStartTime the offPeakStartTime value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withOffPeakStartTime(Time offPeakStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withOffPeakStartTime(offPeakStartTime); + return this; + } + + /** + * Get the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the off-peak phase. + * + * @return the offPeakStartVMOnConnect value. + */ + public SetStartVMOnConnect offPeakStartVMOnConnect() { + return this.innerProperties() == null ? null : this.innerProperties().offPeakStartVMOnConnect(); + } + + /** + * Set the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the off-peak phase. + * + * @param offPeakStartVMOnConnect the offPeakStartVMOnConnect value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withOffPeakStartVMOnConnect(SetStartVMOnConnect offPeakStartVMOnConnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withOffPeakStartVMOnConnect(offPeakStartVMOnConnect); + return this; + } + + /** + * Get the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the off-peak + * period. + * + * @return the offPeakActionOnDisconnect value. + */ + public SessionHandlingOperation offPeakActionOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().offPeakActionOnDisconnect(); + } + + /** + * Set the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the off-peak + * period. + * + * @param offPeakActionOnDisconnect the offPeakActionOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withOffPeakActionOnDisconnect( + SessionHandlingOperation offPeakActionOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withOffPeakActionOnDisconnect(offPeakActionOnDisconnect); + return this; + } + + /** + * Get the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the off-peak period. + * + * @return the offPeakMinutesToWaitOnDisconnect value. + */ + public Integer offPeakMinutesToWaitOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().offPeakMinutesToWaitOnDisconnect(); + } + + /** + * Set the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the off-peak period. + * + * @param offPeakMinutesToWaitOnDisconnect the offPeakMinutesToWaitOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withOffPeakMinutesToWaitOnDisconnect( + Integer offPeakMinutesToWaitOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withOffPeakMinutesToWaitOnDisconnect(offPeakMinutesToWaitOnDisconnect); + return this; + } + + /** + * Get the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak period. + * + * @return the offPeakActionOnLogoff value. + */ + public SessionHandlingOperation offPeakActionOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().offPeakActionOnLogoff(); + } + + /** + * Set the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak period. + * + * @param offPeakActionOnLogoff the offPeakActionOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withOffPeakActionOnLogoff(SessionHandlingOperation offPeakActionOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withOffPeakActionOnLogoff(offPeakActionOnLogoff); + return this; + } + + /** + * Get the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the off-peak period. + * + * @return the offPeakMinutesToWaitOnLogoff value. + */ + public Integer offPeakMinutesToWaitOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().offPeakMinutesToWaitOnLogoff(); + } + + /** + * Set the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the off-peak period. + * + * @param offPeakMinutesToWaitOnLogoff the offPeakMinutesToWaitOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleInner object itself. + */ + public ScalingPlanPersonalScheduleInner withOffPeakMinutesToWaitOnLogoff(Integer offPeakMinutesToWaitOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withOffPeakMinutesToWaitOnLogoff(offPeakMinutesToWaitOnLogoff); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model ScalingPlanPersonalScheduleInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScalingPlanPersonalScheduleInner.class); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPersonalScheduleProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPersonalScheduleProperties.java new file mode 100644 index 000000000000..ef7679fe3be0 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPersonalScheduleProperties.java @@ -0,0 +1,775 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; +import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A ScalingPlanPersonalSchedule. */ +@Fluent +public final class ScalingPlanPersonalScheduleProperties { + /* + * Set of days of the week on which this schedule is active. + */ + @JsonProperty(value = "daysOfWeek") + private List daysOfWeek; + + /* + * Starting time for ramp up period. + */ + @JsonProperty(value = "rampUpStartTime") + private Time rampUpStartTime; + + /* + * The desired startup behavior during the ramp up period for personal vms in the hostpool. + */ + @JsonProperty(value = "rampUpAutoStartHosts") + private StartupBehavior rampUpAutoStartHosts; + + /* + * The desired configuration of Start VM On Connect for the hostpool during the ramp up phase. If this is disabled, + * session hosts must be turned on using rampUpAutoStartHosts or by turning them on manually. + */ + @JsonProperty(value = "rampUpStartVMOnConnect") + private SetStartVMOnConnect rampUpStartVMOnConnect; + + /* + * Action to be taken after a user disconnect during the ramp up period. + */ + @JsonProperty(value = "rampUpActionOnDisconnect") + private SessionHandlingOperation rampUpActionOnDisconnect; + + /* + * The time in minutes to wait before performing the desired session handling action when a user disconnects during + * the ramp up period. + */ + @JsonProperty(value = "rampUpMinutesToWaitOnDisconnect") + private Integer rampUpMinutesToWaitOnDisconnect; + + /* + * Action to be taken after a logoff during the ramp up period. + */ + @JsonProperty(value = "rampUpActionOnLogoff") + private SessionHandlingOperation rampUpActionOnLogoff; + + /* + * The time in minutes to wait before performing the desired session handling action when a user logs off during + * the ramp up period. + */ + @JsonProperty(value = "rampUpMinutesToWaitOnLogoff") + private Integer rampUpMinutesToWaitOnLogoff; + + /* + * Starting time for peak period. + */ + @JsonProperty(value = "peakStartTime") + private Time peakStartTime; + + /* + * The desired configuration of Start VM On Connect for the hostpool during the peak phase. + */ + @JsonProperty(value = "peakStartVMOnConnect") + private SetStartVMOnConnect peakStartVMOnConnect; + + /* + * Action to be taken after a user disconnect during the peak period. + */ + @JsonProperty(value = "peakActionOnDisconnect") + private SessionHandlingOperation peakActionOnDisconnect; + + /* + * The time in minutes to wait before performing the desired session handling action when a user disconnects during + * the peak period. + */ + @JsonProperty(value = "peakMinutesToWaitOnDisconnect") + private Integer peakMinutesToWaitOnDisconnect; + + /* + * Action to be taken after a logoff during the peak period. + */ + @JsonProperty(value = "peakActionOnLogoff") + private SessionHandlingOperation peakActionOnLogoff; + + /* + * The time in minutes to wait before performing the desired session handling action when a user logs off during + * the peak period. + */ + @JsonProperty(value = "peakMinutesToWaitOnLogoff") + private Integer peakMinutesToWaitOnLogoff; + + /* + * Starting time for ramp down period. + */ + @JsonProperty(value = "rampDownStartTime") + private Time rampDownStartTime; + + /* + * The desired configuration of Start VM On Connect for the hostpool during the ramp down phase. + */ + @JsonProperty(value = "rampDownStartVMOnConnect") + private SetStartVMOnConnect rampDownStartVMOnConnect; + + /* + * Action to be taken after a user disconnect during the ramp down period. + */ + @JsonProperty(value = "rampDownActionOnDisconnect") + private SessionHandlingOperation rampDownActionOnDisconnect; + + /* + * The time in minutes to wait before performing the desired session handling action when a user disconnects during + * the ramp down period. + */ + @JsonProperty(value = "rampDownMinutesToWaitOnDisconnect") + private Integer rampDownMinutesToWaitOnDisconnect; + + /* + * Action to be taken after a logoff during the ramp down period. + */ + @JsonProperty(value = "rampDownActionOnLogoff") + private SessionHandlingOperation rampDownActionOnLogoff; + + /* + * The time in minutes to wait before performing the desired session handling action when a user logs off during + * the ramp down period. + */ + @JsonProperty(value = "rampDownMinutesToWaitOnLogoff") + private Integer rampDownMinutesToWaitOnLogoff; + + /* + * Starting time for off-peak period. + */ + @JsonProperty(value = "offPeakStartTime") + private Time offPeakStartTime; + + /* + * The desired configuration of Start VM On Connect for the hostpool during the off-peak phase. + */ + @JsonProperty(value = "offPeakStartVMOnConnect") + private SetStartVMOnConnect offPeakStartVMOnConnect; + + /* + * Action to be taken after a user disconnect during the off-peak period. + */ + @JsonProperty(value = "offPeakActionOnDisconnect") + private SessionHandlingOperation offPeakActionOnDisconnect; + + /* + * The time in minutes to wait before performing the desired session handling action when a user disconnects during + * the off-peak period. + */ + @JsonProperty(value = "offPeakMinutesToWaitOnDisconnect") + private Integer offPeakMinutesToWaitOnDisconnect; + + /* + * Action to be taken after a logoff during the off-peak period. + */ + @JsonProperty(value = "offPeakActionOnLogoff") + private SessionHandlingOperation offPeakActionOnLogoff; + + /* + * The time in minutes to wait before performing the desired session handling action when a user logs off during + * the off-peak period. + */ + @JsonProperty(value = "offPeakMinutesToWaitOnLogoff") + private Integer offPeakMinutesToWaitOnLogoff; + + /** Creates an instance of ScalingPlanPersonalScheduleProperties class. */ + public ScalingPlanPersonalScheduleProperties() { + } + + /** + * Get the daysOfWeek property: Set of days of the week on which this schedule is active. + * + * @return the daysOfWeek value. + */ + public List daysOfWeek() { + return this.daysOfWeek; + } + + /** + * Set the daysOfWeek property: Set of days of the week on which this schedule is active. + * + * @param daysOfWeek the daysOfWeek value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withDaysOfWeek(List daysOfWeek) { + this.daysOfWeek = daysOfWeek; + return this; + } + + /** + * Get the rampUpStartTime property: Starting time for ramp up period. + * + * @return the rampUpStartTime value. + */ + public Time rampUpStartTime() { + return this.rampUpStartTime; + } + + /** + * Set the rampUpStartTime property: Starting time for ramp up period. + * + * @param rampUpStartTime the rampUpStartTime value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withRampUpStartTime(Time rampUpStartTime) { + this.rampUpStartTime = rampUpStartTime; + return this; + } + + /** + * Get the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for personal vms in + * the hostpool. + * + * @return the rampUpAutoStartHosts value. + */ + public StartupBehavior rampUpAutoStartHosts() { + return this.rampUpAutoStartHosts; + } + + /** + * Set the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for personal vms in + * the hostpool. + * + * @param rampUpAutoStartHosts the rampUpAutoStartHosts value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withRampUpAutoStartHosts(StartupBehavior rampUpAutoStartHosts) { + this.rampUpAutoStartHosts = rampUpAutoStartHosts; + return this; + } + + /** + * Get the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during + * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning + * them on manually. + * + * @return the rampUpStartVMOnConnect value. + */ + public SetStartVMOnConnect rampUpStartVMOnConnect() { + return this.rampUpStartVMOnConnect; + } + + /** + * Set the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during + * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning + * them on manually. + * + * @param rampUpStartVMOnConnect the rampUpStartVMOnConnect value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withRampUpStartVMOnConnect( + SetStartVMOnConnect rampUpStartVMOnConnect) { + this.rampUpStartVMOnConnect = rampUpStartVMOnConnect; + return this; + } + + /** + * Get the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the ramp up period. + * + * @return the rampUpActionOnDisconnect value. + */ + public SessionHandlingOperation rampUpActionOnDisconnect() { + return this.rampUpActionOnDisconnect; + } + + /** + * Set the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the ramp up period. + * + * @param rampUpActionOnDisconnect the rampUpActionOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withRampUpActionOnDisconnect( + SessionHandlingOperation rampUpActionOnDisconnect) { + this.rampUpActionOnDisconnect = rampUpActionOnDisconnect; + return this; + } + + /** + * Get the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp up period. + * + * @return the rampUpMinutesToWaitOnDisconnect value. + */ + public Integer rampUpMinutesToWaitOnDisconnect() { + return this.rampUpMinutesToWaitOnDisconnect; + } + + /** + * Set the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp up period. + * + * @param rampUpMinutesToWaitOnDisconnect the rampUpMinutesToWaitOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withRampUpMinutesToWaitOnDisconnect( + Integer rampUpMinutesToWaitOnDisconnect) { + this.rampUpMinutesToWaitOnDisconnect = rampUpMinutesToWaitOnDisconnect; + return this; + } + + /** + * Get the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up period. + * + * @return the rampUpActionOnLogoff value. + */ + public SessionHandlingOperation rampUpActionOnLogoff() { + return this.rampUpActionOnLogoff; + } + + /** + * Set the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up period. + * + * @param rampUpActionOnLogoff the rampUpActionOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withRampUpActionOnLogoff( + SessionHandlingOperation rampUpActionOnLogoff) { + this.rampUpActionOnLogoff = rampUpActionOnLogoff; + return this; + } + + /** + * Get the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp up period. + * + * @return the rampUpMinutesToWaitOnLogoff value. + */ + public Integer rampUpMinutesToWaitOnLogoff() { + return this.rampUpMinutesToWaitOnLogoff; + } + + /** + * Set the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp up period. + * + * @param rampUpMinutesToWaitOnLogoff the rampUpMinutesToWaitOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withRampUpMinutesToWaitOnLogoff(Integer rampUpMinutesToWaitOnLogoff) { + this.rampUpMinutesToWaitOnLogoff = rampUpMinutesToWaitOnLogoff; + return this; + } + + /** + * Get the peakStartTime property: Starting time for peak period. + * + * @return the peakStartTime value. + */ + public Time peakStartTime() { + return this.peakStartTime; + } + + /** + * Set the peakStartTime property: Starting time for peak period. + * + * @param peakStartTime the peakStartTime value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withPeakStartTime(Time peakStartTime) { + this.peakStartTime = peakStartTime; + return this; + } + + /** + * Get the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during + * the peak phase. + * + * @return the peakStartVMOnConnect value. + */ + public SetStartVMOnConnect peakStartVMOnConnect() { + return this.peakStartVMOnConnect; + } + + /** + * Set the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during + * the peak phase. + * + * @param peakStartVMOnConnect the peakStartVMOnConnect value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withPeakStartVMOnConnect(SetStartVMOnConnect peakStartVMOnConnect) { + this.peakStartVMOnConnect = peakStartVMOnConnect; + return this; + } + + /** + * Get the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak period. + * + * @return the peakActionOnDisconnect value. + */ + public SessionHandlingOperation peakActionOnDisconnect() { + return this.peakActionOnDisconnect; + } + + /** + * Set the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak period. + * + * @param peakActionOnDisconnect the peakActionOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withPeakActionOnDisconnect( + SessionHandlingOperation peakActionOnDisconnect) { + this.peakActionOnDisconnect = peakActionOnDisconnect; + return this; + } + + /** + * Get the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired session + * handling action when a user disconnects during the peak period. + * + * @return the peakMinutesToWaitOnDisconnect value. + */ + public Integer peakMinutesToWaitOnDisconnect() { + return this.peakMinutesToWaitOnDisconnect; + } + + /** + * Set the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired session + * handling action when a user disconnects during the peak period. + * + * @param peakMinutesToWaitOnDisconnect the peakMinutesToWaitOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withPeakMinutesToWaitOnDisconnect( + Integer peakMinutesToWaitOnDisconnect) { + this.peakMinutesToWaitOnDisconnect = peakMinutesToWaitOnDisconnect; + return this; + } + + /** + * Get the peakActionOnLogoff property: Action to be taken after a logoff during the peak period. + * + * @return the peakActionOnLogoff value. + */ + public SessionHandlingOperation peakActionOnLogoff() { + return this.peakActionOnLogoff; + } + + /** + * Set the peakActionOnLogoff property: Action to be taken after a logoff during the peak period. + * + * @param peakActionOnLogoff the peakActionOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withPeakActionOnLogoff(SessionHandlingOperation peakActionOnLogoff) { + this.peakActionOnLogoff = peakActionOnLogoff; + return this; + } + + /** + * Get the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the peak period. + * + * @return the peakMinutesToWaitOnLogoff value. + */ + public Integer peakMinutesToWaitOnLogoff() { + return this.peakMinutesToWaitOnLogoff; + } + + /** + * Set the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the peak period. + * + * @param peakMinutesToWaitOnLogoff the peakMinutesToWaitOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withPeakMinutesToWaitOnLogoff(Integer peakMinutesToWaitOnLogoff) { + this.peakMinutesToWaitOnLogoff = peakMinutesToWaitOnLogoff; + return this; + } + + /** + * Get the rampDownStartTime property: Starting time for ramp down period. + * + * @return the rampDownStartTime value. + */ + public Time rampDownStartTime() { + return this.rampDownStartTime; + } + + /** + * Set the rampDownStartTime property: Starting time for ramp down period. + * + * @param rampDownStartTime the rampDownStartTime value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withRampDownStartTime(Time rampDownStartTime) { + this.rampDownStartTime = rampDownStartTime; + return this; + } + + /** + * Get the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the ramp down phase. + * + * @return the rampDownStartVMOnConnect value. + */ + public SetStartVMOnConnect rampDownStartVMOnConnect() { + return this.rampDownStartVMOnConnect; + } + + /** + * Set the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the ramp down phase. + * + * @param rampDownStartVMOnConnect the rampDownStartVMOnConnect value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withRampDownStartVMOnConnect( + SetStartVMOnConnect rampDownStartVMOnConnect) { + this.rampDownStartVMOnConnect = rampDownStartVMOnConnect; + return this; + } + + /** + * Get the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the ramp down + * period. + * + * @return the rampDownActionOnDisconnect value. + */ + public SessionHandlingOperation rampDownActionOnDisconnect() { + return this.rampDownActionOnDisconnect; + } + + /** + * Set the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the ramp down + * period. + * + * @param rampDownActionOnDisconnect the rampDownActionOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withRampDownActionOnDisconnect( + SessionHandlingOperation rampDownActionOnDisconnect) { + this.rampDownActionOnDisconnect = rampDownActionOnDisconnect; + return this; + } + + /** + * Get the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp down period. + * + * @return the rampDownMinutesToWaitOnDisconnect value. + */ + public Integer rampDownMinutesToWaitOnDisconnect() { + return this.rampDownMinutesToWaitOnDisconnect; + } + + /** + * Set the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp down period. + * + * @param rampDownMinutesToWaitOnDisconnect the rampDownMinutesToWaitOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withRampDownMinutesToWaitOnDisconnect( + Integer rampDownMinutesToWaitOnDisconnect) { + this.rampDownMinutesToWaitOnDisconnect = rampDownMinutesToWaitOnDisconnect; + return this; + } + + /** + * Get the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down period. + * + * @return the rampDownActionOnLogoff value. + */ + public SessionHandlingOperation rampDownActionOnLogoff() { + return this.rampDownActionOnLogoff; + } + + /** + * Set the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down period. + * + * @param rampDownActionOnLogoff the rampDownActionOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withRampDownActionOnLogoff( + SessionHandlingOperation rampDownActionOnLogoff) { + this.rampDownActionOnLogoff = rampDownActionOnLogoff; + return this; + } + + /** + * Get the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp down period. + * + * @return the rampDownMinutesToWaitOnLogoff value. + */ + public Integer rampDownMinutesToWaitOnLogoff() { + return this.rampDownMinutesToWaitOnLogoff; + } + + /** + * Set the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp down period. + * + * @param rampDownMinutesToWaitOnLogoff the rampDownMinutesToWaitOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withRampDownMinutesToWaitOnLogoff( + Integer rampDownMinutesToWaitOnLogoff) { + this.rampDownMinutesToWaitOnLogoff = rampDownMinutesToWaitOnLogoff; + return this; + } + + /** + * Get the offPeakStartTime property: Starting time for off-peak period. + * + * @return the offPeakStartTime value. + */ + public Time offPeakStartTime() { + return this.offPeakStartTime; + } + + /** + * Set the offPeakStartTime property: Starting time for off-peak period. + * + * @param offPeakStartTime the offPeakStartTime value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withOffPeakStartTime(Time offPeakStartTime) { + this.offPeakStartTime = offPeakStartTime; + return this; + } + + /** + * Get the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the off-peak phase. + * + * @return the offPeakStartVMOnConnect value. + */ + public SetStartVMOnConnect offPeakStartVMOnConnect() { + return this.offPeakStartVMOnConnect; + } + + /** + * Set the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the off-peak phase. + * + * @param offPeakStartVMOnConnect the offPeakStartVMOnConnect value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withOffPeakStartVMOnConnect( + SetStartVMOnConnect offPeakStartVMOnConnect) { + this.offPeakStartVMOnConnect = offPeakStartVMOnConnect; + return this; + } + + /** + * Get the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the off-peak + * period. + * + * @return the offPeakActionOnDisconnect value. + */ + public SessionHandlingOperation offPeakActionOnDisconnect() { + return this.offPeakActionOnDisconnect; + } + + /** + * Set the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the off-peak + * period. + * + * @param offPeakActionOnDisconnect the offPeakActionOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withOffPeakActionOnDisconnect( + SessionHandlingOperation offPeakActionOnDisconnect) { + this.offPeakActionOnDisconnect = offPeakActionOnDisconnect; + return this; + } + + /** + * Get the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the off-peak period. + * + * @return the offPeakMinutesToWaitOnDisconnect value. + */ + public Integer offPeakMinutesToWaitOnDisconnect() { + return this.offPeakMinutesToWaitOnDisconnect; + } + + /** + * Set the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the off-peak period. + * + * @param offPeakMinutesToWaitOnDisconnect the offPeakMinutesToWaitOnDisconnect value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withOffPeakMinutesToWaitOnDisconnect( + Integer offPeakMinutesToWaitOnDisconnect) { + this.offPeakMinutesToWaitOnDisconnect = offPeakMinutesToWaitOnDisconnect; + return this; + } + + /** + * Get the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak period. + * + * @return the offPeakActionOnLogoff value. + */ + public SessionHandlingOperation offPeakActionOnLogoff() { + return this.offPeakActionOnLogoff; + } + + /** + * Set the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak period. + * + * @param offPeakActionOnLogoff the offPeakActionOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withOffPeakActionOnLogoff( + SessionHandlingOperation offPeakActionOnLogoff) { + this.offPeakActionOnLogoff = offPeakActionOnLogoff; + return this; + } + + /** + * Get the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the off-peak period. + * + * @return the offPeakMinutesToWaitOnLogoff value. + */ + public Integer offPeakMinutesToWaitOnLogoff() { + return this.offPeakMinutesToWaitOnLogoff; + } + + /** + * Set the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the off-peak period. + * + * @param offPeakMinutesToWaitOnLogoff the offPeakMinutesToWaitOnLogoff value to set. + * @return the ScalingPlanPersonalScheduleProperties object itself. + */ + public ScalingPlanPersonalScheduleProperties withOffPeakMinutesToWaitOnLogoff( + Integer offPeakMinutesToWaitOnLogoff) { + this.offPeakMinutesToWaitOnLogoff = offPeakMinutesToWaitOnLogoff; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (rampUpStartTime() != null) { + rampUpStartTime().validate(); + } + if (peakStartTime() != null) { + peakStartTime().validate(); + } + if (rampDownStartTime() != null) { + rampDownStartTime().validate(); + } + if (offPeakStartTime() != null) { + offPeakStartTime().validate(); + } + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceInner.java index 37c0925810d7..6af070c09a8f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceInner.java @@ -6,6 +6,8 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.SystemData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; +import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySet; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan; @@ -187,6 +189,41 @@ public Boolean cloudPcResource() { return this.innerProperties() == null ? null : this.innerProperties().cloudPcResource(); } + /** + * Get the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private + * networks, Disabled allows this resource to only be accessed via private endpoints. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private + * networks, Disabled allows this resource to only be accessed via private endpoints. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspaceProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + /** + * Get the privateEndpointConnections property: List of private endpoint connection associated with the specified + * resource. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + } + /** * Validates the instance. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspacePatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspacePatchProperties.java index b92f1f55a652..4ec700cac29a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspacePatchProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspacePatchProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.desktopvirtualization.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -29,6 +30,12 @@ public final class WorkspacePatchProperties { @JsonProperty(value = "applicationGroupReferences") private List applicationGroupReferences; + /* + * Enabled to allow this resource to be access from the public network + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + /** Creates an instance of WorkspacePatchProperties class. */ public WorkspacePatchProperties() { } @@ -93,6 +100,26 @@ public WorkspacePatchProperties withApplicationGroupReferences(List appl return this; } + /** + * Get the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the WorkspacePatchProperties object itself. + */ + public WorkspacePatchProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + /** * Validates the instance. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceProperties.java index 56641d158bae..aec93ac5b3cd 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceProperties.java @@ -5,6 +5,8 @@ package com.azure.resourcemanager.desktopvirtualization.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; +import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -41,6 +43,19 @@ public final class WorkspaceProperties { @JsonProperty(value = "cloudPcResource", access = JsonProperty.Access.WRITE_ONLY) private Boolean cloudPcResource; + /* + * Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource + * to only be accessed via private endpoints + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + + /* + * List of private endpoint connection associated with the specified resource + */ + @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + /** Creates an instance of WorkspaceProperties class. */ public WorkspaceProperties() { } @@ -123,11 +138,46 @@ public Boolean cloudPcResource() { return this.cloudPcResource; } + /** + * Get the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private + * networks, Disabled allows this resource to only be accessed via private endpoints. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private + * networks, Disabled allows this resource to only be accessed via private endpoints. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the WorkspaceProperties object itself. + */ + public WorkspaceProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the privateEndpointConnections property: List of private endpoint connection associated with the specified + * resource. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupImpl.java index 5bb695f67ac4..b65a7681c141 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupImpl.java @@ -104,6 +104,10 @@ public Boolean cloudPcResource() { return this.innerModel().cloudPcResource(); } + public Boolean showInFeed() { + return this.innerModel().showInFeed(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -291,6 +295,16 @@ public ApplicationGroupImpl withFriendlyName(String friendlyName) { } } + public ApplicationGroupImpl withShowInFeed(Boolean showInFeed) { + if (isInCreateMode()) { + this.innerModel().withShowInFeed(showInFeed); + return this; + } else { + this.updateApplicationGroup.withShowInFeed(showInFeed); + return this; + } + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopVirtualizationApiClientBuilder.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopVirtualizationApiClientBuilder.java index cd894795de88..e626cc117f2b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopVirtualizationApiClientBuilder.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopVirtualizationApiClientBuilder.java @@ -137,7 +137,7 @@ public DesktopVirtualizationApiClientImpl buildClient() { localSerializerAdapter, localDefaultPollInterval, localEnvironment, - subscriptionId, + this.subscriptionId, localEndpoint); return client; } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopVirtualizationApiClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopVirtualizationApiClientImpl.java index d10c958adb3c..d56062c1038a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopVirtualizationApiClientImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopVirtualizationApiClientImpl.java @@ -30,6 +30,9 @@ import com.azure.resourcemanager.desktopvirtualization.fluent.MsixImagesClient; import com.azure.resourcemanager.desktopvirtualization.fluent.MsixPackagesClient; import com.azure.resourcemanager.desktopvirtualization.fluent.OperationsClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.ScalingPlanPersonalSchedulesClient; import com.azure.resourcemanager.desktopvirtualization.fluent.ScalingPlanPooledSchedulesClient; import com.azure.resourcemanager.desktopvirtualization.fluent.ScalingPlansClient; import com.azure.resourcemanager.desktopvirtualization.fluent.SessionHostsClient; @@ -144,6 +147,30 @@ public WorkspacesClient getWorkspaces() { return this.workspaces; } + /** The PrivateEndpointConnectionsClient object to access its operations. */ + private final PrivateEndpointConnectionsClient privateEndpointConnections; + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** The PrivateLinkResourcesClient object to access its operations. */ + private final PrivateLinkResourcesClient privateLinkResources; + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; + } + /** The ScalingPlansClient object to access its operations. */ private final ScalingPlansClient scalingPlans; @@ -168,6 +195,18 @@ public ScalingPlanPooledSchedulesClient getScalingPlanPooledSchedules() { return this.scalingPlanPooledSchedules; } + /** The ScalingPlanPersonalSchedulesClient object to access its operations. */ + private final ScalingPlanPersonalSchedulesClient scalingPlanPersonalSchedules; + + /** + * Gets the ScalingPlanPersonalSchedulesClient object to access its operations. + * + * @return the ScalingPlanPersonalSchedulesClient object. + */ + public ScalingPlanPersonalSchedulesClient getScalingPlanPersonalSchedules() { + return this.scalingPlanPersonalSchedules; + } + /** The ApplicationGroupsClient object to access its operations. */ private final ApplicationGroupsClient applicationGroups; @@ -298,11 +337,14 @@ public MsixImagesClient getMsixImages() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-09-09"; + this.apiVersion = "2023-09-05"; this.operations = new OperationsClientImpl(this); this.workspaces = new WorkspacesClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.scalingPlans = new ScalingPlansClientImpl(this); this.scalingPlanPooledSchedules = new ScalingPlanPooledSchedulesClientImpl(this); + this.scalingPlanPersonalSchedules = new ScalingPlanPersonalSchedulesClientImpl(this); this.applicationGroups = new ApplicationGroupsClientImpl(this); this.startMenuItems = new StartMenuItemsClientImpl(this); this.applications = new ApplicationsClientImpl(this); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolImpl.java index 4327693dd73b..c1f35897f130 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolImpl.java @@ -15,9 +15,11 @@ import com.azure.resourcemanager.desktopvirtualization.models.HostPool; import com.azure.resourcemanager.desktopvirtualization.models.HostPoolPatch; import com.azure.resourcemanager.desktopvirtualization.models.HostPoolType; +import com.azure.resourcemanager.desktopvirtualization.models.HostpoolPublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfo; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfoPatch; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; @@ -176,10 +178,23 @@ public Boolean cloudPcResource() { return this.innerModel().cloudPcResource(); } + public HostpoolPublicNetworkAccess publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + public AgentUpdateProperties agentUpdate() { return this.innerModel().agentUpdate(); } + public List privateEndpointConnections() { + List inner = this.innerModel().privateEndpointConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public Region region() { return Region.fromName(this.regionName()); } @@ -507,6 +522,16 @@ public HostPoolImpl withStartVMOnConnect(Boolean startVMOnConnect) { } } + public HostPoolImpl withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess) { + if (isInCreateMode()) { + this.innerModel().withPublicNetworkAccess(publicNetworkAccess); + return this; + } else { + this.updateHostPool.withPublicNetworkAccess(publicNetworkAccess); + return this; + } + } + public HostPoolImpl withAgentUpdate(AgentUpdateProperties agentUpdate) { this.innerModel().withAgentUpdate(agentUpdate); return this; diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolPropertiesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolPropertiesImpl.java index fab75fa0e9f4..fe4dac4abd98 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolPropertiesImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolPropertiesImpl.java @@ -9,9 +9,11 @@ import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdateProperties; import com.azure.resourcemanager.desktopvirtualization.models.HostPoolProperties; import com.azure.resourcemanager.desktopvirtualization.models.HostPoolType; +import com.azure.resourcemanager.desktopvirtualization.models.HostpoolPublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfo; import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import java.util.Collections; @@ -119,10 +121,23 @@ public Boolean cloudPcResource() { return this.innerModel().cloudPcResource(); } + public HostpoolPublicNetworkAccess publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + public AgentUpdateProperties agentUpdate() { return this.innerModel().agentUpdate(); } + public List privateEndpointConnections() { + List inner = this.innerModel().privateEndpointConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public HostPoolPropertiesInner innerModel() { return this.innerObject; } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionWithSystemDataImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionWithSystemDataImpl.java new file mode 100644 index 000000000000..56039e66e293 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionWithSystemDataImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; + +public final class PrivateEndpointConnectionWithSystemDataImpl implements PrivateEndpointConnectionWithSystemData { + private PrivateEndpointConnectionWithSystemDataInner innerObject; + + private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; + + PrivateEndpointConnectionWithSystemDataImpl( + PrivateEndpointConnectionWithSystemDataInner innerObject, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public PrivateEndpoint privateEndpoint() { + return this.innerModel().privateEndpoint(); + } + + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.innerModel().privateLinkServiceConnectionState(); + } + + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public PrivateEndpointConnectionWithSystemDataInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsClientImpl.java new file mode 100644 index 000000000000..af7c055d0ac6 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsClientImpl.java @@ -0,0 +1,1898 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.desktopvirtualization.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionListResultWithSystemData; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { + /** The proxy service used to perform REST calls. */ + private final PrivateEndpointConnectionsService service; + + /** The service client containing this operation class. */ + private final DesktopVirtualizationApiClientImpl client; + + /** + * Initializes an instance of PrivateEndpointConnectionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrivateEndpointConnectionsClientImpl(DesktopVirtualizationApiClientImpl client) { + this.service = + RestProxy + .create( + PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DesktopVirtualizationApiClientPrivateEndpointConnections to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DesktopVirtualizatio") + public interface PrivateEndpointConnectionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkspace( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByWorkspace( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteByWorkspace( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateByWorkspace( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @BodyParam("application/json") PrivateEndpointConnection connection, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByHostPool( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("hostPoolName") String hostPoolName, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByHostPool( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("hostPoolName") String hostPoolName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteByHostPool( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("hostPoolName") String hostPoolName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateByHostPool( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("hostPoolName") String hostPoolName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @BodyParam("application/json") PrivateEndpointConnection connection, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkspaceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByHostPoolNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkspaceSinglePageAsync( + String resourceGroupName, String workspaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByWorkspace( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkspaceSinglePageAsync( + String resourceGroupName, String workspaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByWorkspace( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByWorkspaceAsync( + String resourceGroupName, String workspaceName) { + return new PagedFlux<>( + () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName), + nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); + } + + /** + * List private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkspaceAsync( + String resourceGroupName, String workspaceName, Context context) { + return new PagedFlux<>( + () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, context), + nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); + } + + /** + * List private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkspace( + String resourceGroupName, String workspaceName) { + return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName)); + } + + /** + * List private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkspace( + String resourceGroupName, String workspaceName, Context context) { + return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, context)); + } + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByWorkspaceWithResponseAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByWorkspace( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByWorkspaceWithResponseAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByWorkspace( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + accept, + context); + } + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByWorkspaceAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + return getByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + return getByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) + .block(); + } + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionWithSystemDataInner getByWorkspace( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + return getByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) + .getValue(); + } + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteByWorkspaceWithResponseAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .deleteByWorkspace( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteByWorkspaceWithResponseAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .deleteByWorkspace( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + accept, + context); + } + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteByWorkspaceAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + return deleteByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + return deleteByWorkspaceWithResponseAsync( + resourceGroupName, workspaceName, privateEndpointConnectionName, context) + .block(); + } + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteByWorkspace( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + deleteByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE); + } + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateByWorkspaceWithResponseAsync( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (connection == null) { + return Mono.error(new IllegalArgumentException("Parameter connection is required and cannot be null.")); + } else { + connection.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateByWorkspace( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + connection, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateByWorkspaceWithResponseAsync( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (connection == null) { + return Mono.error(new IllegalArgumentException("Parameter connection is required and cannot be null.")); + } else { + connection.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateByWorkspace( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + connection, + accept, + context); + } + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateByWorkspaceAsync( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection) { + return updateByWorkspaceWithResponseAsync( + resourceGroupName, workspaceName, privateEndpointConnectionName, connection) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateByWorkspaceWithResponse( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection, + Context context) { + return updateByWorkspaceWithResponseAsync( + resourceGroupName, workspaceName, privateEndpointConnectionName, connection, context) + .block(); + } + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionWithSystemDataInner updateByWorkspace( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection) { + return updateByWorkspaceWithResponse( + resourceGroupName, workspaceName, privateEndpointConnectionName, connection, Context.NONE) + .getValue(); + } + + /** + * List private endpoint connections associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByHostPoolSinglePageAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByHostPool( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + hostPoolName, + pageSize, + isDescending, + initialSkip, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List private endpoint connections associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByHostPoolSinglePageAsync( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByHostPool( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + hostPoolName, + pageSize, + isDescending, + initialSkip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List private endpoint connections associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); + } + + /** + * List private endpoint connections associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); + } + + /** + * List private endpoint connections associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByHostPoolAsync( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedFlux<>( + () -> + listByHostPoolSinglePageAsync( + resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), + nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); + } + + /** + * List private endpoint connections associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByHostPool( + String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip)); + } + + /** + * List private endpoint connections associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context)); + } + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByHostPoolWithResponseAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByHostPool( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + hostPoolName, + privateEndpointConnectionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByHostPoolWithResponseAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByHostPool( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + hostPoolName, + privateEndpointConnectionName, + accept, + context); + } + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByHostPoolAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + return getByHostPoolWithResponseAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { + return getByHostPoolWithResponseAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName, context) + .block(); + } + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionWithSystemDataInner getByHostPool( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + return getByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, Context.NONE) + .getValue(); + } + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteByHostPoolWithResponseAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .deleteByHostPool( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + hostPoolName, + privateEndpointConnectionName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteByHostPoolWithResponseAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .deleteByHostPool( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + hostPoolName, + privateEndpointConnectionName, + accept, + context); + } + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteByHostPoolAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + return deleteByHostPoolWithResponseAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { + return deleteByHostPoolWithResponseAsync( + resourceGroupName, hostPoolName, privateEndpointConnectionName, context) + .block(); + } + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteByHostPool(String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + deleteByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, Context.NONE); + } + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateByHostPoolWithResponseAsync( + String resourceGroupName, + String hostPoolName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (connection == null) { + return Mono.error(new IllegalArgumentException("Parameter connection is required and cannot be null.")); + } else { + connection.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateByHostPool( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + hostPoolName, + privateEndpointConnectionName, + connection, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateByHostPoolWithResponseAsync( + String resourceGroupName, + String hostPoolName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (connection == null) { + return Mono.error(new IllegalArgumentException("Parameter connection is required and cannot be null.")); + } else { + connection.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateByHostPool( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + hostPoolName, + privateEndpointConnectionName, + connection, + accept, + context); + } + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateByHostPoolAsync( + String resourceGroupName, + String hostPoolName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection) { + return updateByHostPoolWithResponseAsync( + resourceGroupName, hostPoolName, privateEndpointConnectionName, connection) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateByHostPoolWithResponse( + String resourceGroupName, + String hostPoolName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection, + Context context) { + return updateByHostPoolWithResponseAsync( + resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, context) + .block(); + } + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionWithSystemDataInner updateByHostPool( + String resourceGroupName, + String hostPoolName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection) { + return updateByHostPoolWithResponse( + resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkspaceNextSinglePageAsync( + String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkspaceNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByHostPoolNextSinglePageAsync( + String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByHostPoolNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsImpl.java new file mode 100644 index 000000000000..9c1e1c9a0ca7 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsImpl.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.desktopvirtualization.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnections; + +public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); + + private final PrivateEndpointConnectionsClient innerClient; + + private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; + + public PrivateEndpointConnectionsImpl( + PrivateEndpointConnectionsClient innerClient, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByWorkspace( + String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager())); + } + + public PagedIterable listByWorkspace( + String resourceGroupName, String workspaceName, Context context) { + PagedIterable inner = + this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); + return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager())); + } + + public Response getByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + Response inner = + this + .serviceClient() + .getByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateEndpointConnectionWithSystemDataImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateEndpointConnectionWithSystemData getByWorkspace( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + PrivateEndpointConnectionWithSystemDataInner inner = + this.serviceClient().getByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName); + if (inner != null) { + return new PrivateEndpointConnectionWithSystemDataImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + return this + .serviceClient() + .deleteByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); + } + + public void deleteByWorkspace( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + this.serviceClient().deleteByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName); + } + + public Response updateByWorkspaceWithResponse( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection, + Context context) { + Response inner = + this + .serviceClient() + .updateByWorkspaceWithResponse( + resourceGroupName, workspaceName, privateEndpointConnectionName, connection, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateEndpointConnectionWithSystemDataImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateEndpointConnectionWithSystemData updateByWorkspace( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection) { + PrivateEndpointConnectionWithSystemDataInner inner = + this + .serviceClient() + .updateByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName, connection); + if (inner != null) { + return new PrivateEndpointConnectionWithSystemDataImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByHostPool( + String resourceGroupName, String hostPoolName) { + PagedIterable inner = + this.serviceClient().listByHostPool(resourceGroupName, hostPoolName); + return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager())); + } + + public PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + PagedIterable inner = + this + .serviceClient() + .listByHostPool(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context); + return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager())); + } + + public Response getByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { + Response inner = + this + .serviceClient() + .getByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateEndpointConnectionWithSystemDataImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateEndpointConnectionWithSystemData getByHostPool( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + PrivateEndpointConnectionWithSystemDataInner inner = + this.serviceClient().getByHostPool(resourceGroupName, hostPoolName, privateEndpointConnectionName); + if (inner != null) { + return new PrivateEndpointConnectionWithSystemDataImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { + return this + .serviceClient() + .deleteByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, context); + } + + public void deleteByHostPool(String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + this.serviceClient().deleteByHostPool(resourceGroupName, hostPoolName, privateEndpointConnectionName); + } + + public Response updateByHostPoolWithResponse( + String resourceGroupName, + String hostPoolName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection, + Context context) { + Response inner = + this + .serviceClient() + .updateByHostPoolWithResponse( + resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateEndpointConnectionWithSystemDataImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateEndpointConnectionWithSystemData updateByHostPool( + String resourceGroupName, + String hostPoolName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection) { + PrivateEndpointConnectionWithSystemDataInner inner = + this + .serviceClient() + .updateByHostPool(resourceGroupName, hostPoolName, privateEndpointConnectionName, connection); + if (inner != null) { + return new PrivateEndpointConnectionWithSystemDataImpl(inner, this.manager()); + } else { + return null; + } + } + + private PrivateEndpointConnectionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourceImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourceImpl.java new file mode 100644 index 000000000000..5719a5128e9e --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourceImpl.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.implementation; + +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResource; +import java.util.Collections; +import java.util.List; + +public final class PrivateLinkResourceImpl implements PrivateLinkResource { + private PrivateLinkResourceInner innerObject; + + private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; + + PrivateLinkResourceImpl( + PrivateLinkResourceInner innerObject, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String groupId() { + return this.innerModel().groupId(); + } + + public List requiredMembers() { + List inner = this.innerModel().requiredMembers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List requiredZoneNames() { + List inner = this.innerModel().requiredZoneNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PrivateLinkResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesClientImpl.java new file mode 100644 index 000000000000..7900ce2c695b --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesClientImpl.java @@ -0,0 +1,758 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.desktopvirtualization.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResourceListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { + /** The proxy service used to perform REST calls. */ + private final PrivateLinkResourcesService service; + + /** The service client containing this operation class. */ + private final DesktopVirtualizationApiClientImpl client; + + /** + * Initializes an instance of PrivateLinkResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrivateLinkResourcesClientImpl(DesktopVirtualizationApiClientImpl client) { + this.service = + RestProxy + .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DesktopVirtualizationApiClientPrivateLinkResources to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DesktopVirtualizatio") + public interface PrivateLinkResourcesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateLinkResources") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkspace( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateLinkResources") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByHostPool( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("hostPoolName") String hostPoolName, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkspaceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByHostPoolNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List the private link resources available for this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkspaceSinglePageAsync( + String resourceGroupName, String workspaceName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByWorkspace( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + pageSize, + isDescending, + initialSkip, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the private link resources available for this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkspaceSinglePageAsync( + String resourceGroupName, + String workspaceName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByWorkspace( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + pageSize, + isDescending, + initialSkip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List the private link resources available for this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByWorkspaceAsync( + String resourceGroupName, String workspaceName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip), + nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); + } + + /** + * List the private link resources available for this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip), + nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); + } + + /** + * List the private link resources available for this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkspaceAsync( + String resourceGroupName, + String workspaceName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedFlux<>( + () -> + listByWorkspaceSinglePageAsync( + resourceGroupName, workspaceName, pageSize, isDescending, initialSkip, context), + nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); + } + + /** + * List the private link resources available for this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listByWorkspaceAsync(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip)); + } + + /** + * List the private link resources available for this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkspace( + String resourceGroupName, + String workspaceName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listByWorkspaceAsync(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip, context)); + } + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByHostPoolSinglePageAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByHostPool( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + hostPoolName, + pageSize, + isDescending, + initialSkip, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByHostPoolSinglePageAsync( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByHostPool( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + hostPoolName, + pageSize, + isDescending, + initialSkip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); + } + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); + } + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByHostPoolAsync( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedFlux<>( + () -> + listByHostPoolSinglePageAsync( + resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), + nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); + } + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip)); + } + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkspaceNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkspaceNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByHostPoolNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByHostPoolNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesImpl.java new file mode 100644 index 000000000000..bf1f3ace3c3a --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesImpl.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.desktopvirtualization.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResource; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResources; + +public final class PrivateLinkResourcesImpl implements PrivateLinkResources { + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesImpl.class); + + private final PrivateLinkResourcesClient innerClient; + + private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; + + public PrivateLinkResourcesImpl( + PrivateLinkResourcesClient innerClient, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByWorkspace( + String resourceGroupName, + String workspaceName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + PagedIterable inner = + this + .serviceClient() + .listByWorkspace(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip, context); + return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName) { + PagedIterable inner = + this.serviceClient().listByHostPool(resourceGroupName, hostPoolName); + return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + PagedIterable inner = + this + .serviceClient() + .listByHostPool(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context); + return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + + private PrivateLinkResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalScheduleImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalScheduleImpl.java new file mode 100644 index 000000000000..61281fff0eeb --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalScheduleImpl.java @@ -0,0 +1,536 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedule; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedulePatch; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; +import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import java.util.Collections; +import java.util.List; + +public final class ScalingPlanPersonalScheduleImpl + implements ScalingPlanPersonalSchedule, ScalingPlanPersonalSchedule.Definition, ScalingPlanPersonalSchedule.Update { + private ScalingPlanPersonalScheduleInner innerObject; + + private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public List daysOfWeek() { + List inner = this.innerModel().daysOfWeek(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Time rampUpStartTime() { + return this.innerModel().rampUpStartTime(); + } + + public StartupBehavior rampUpAutoStartHosts() { + return this.innerModel().rampUpAutoStartHosts(); + } + + public SetStartVMOnConnect rampUpStartVMOnConnect() { + return this.innerModel().rampUpStartVMOnConnect(); + } + + public SessionHandlingOperation rampUpActionOnDisconnect() { + return this.innerModel().rampUpActionOnDisconnect(); + } + + public Integer rampUpMinutesToWaitOnDisconnect() { + return this.innerModel().rampUpMinutesToWaitOnDisconnect(); + } + + public SessionHandlingOperation rampUpActionOnLogoff() { + return this.innerModel().rampUpActionOnLogoff(); + } + + public Integer rampUpMinutesToWaitOnLogoff() { + return this.innerModel().rampUpMinutesToWaitOnLogoff(); + } + + public Time peakStartTime() { + return this.innerModel().peakStartTime(); + } + + public SetStartVMOnConnect peakStartVMOnConnect() { + return this.innerModel().peakStartVMOnConnect(); + } + + public SessionHandlingOperation peakActionOnDisconnect() { + return this.innerModel().peakActionOnDisconnect(); + } + + public Integer peakMinutesToWaitOnDisconnect() { + return this.innerModel().peakMinutesToWaitOnDisconnect(); + } + + public SessionHandlingOperation peakActionOnLogoff() { + return this.innerModel().peakActionOnLogoff(); + } + + public Integer peakMinutesToWaitOnLogoff() { + return this.innerModel().peakMinutesToWaitOnLogoff(); + } + + public Time rampDownStartTime() { + return this.innerModel().rampDownStartTime(); + } + + public SetStartVMOnConnect rampDownStartVMOnConnect() { + return this.innerModel().rampDownStartVMOnConnect(); + } + + public SessionHandlingOperation rampDownActionOnDisconnect() { + return this.innerModel().rampDownActionOnDisconnect(); + } + + public Integer rampDownMinutesToWaitOnDisconnect() { + return this.innerModel().rampDownMinutesToWaitOnDisconnect(); + } + + public SessionHandlingOperation rampDownActionOnLogoff() { + return this.innerModel().rampDownActionOnLogoff(); + } + + public Integer rampDownMinutesToWaitOnLogoff() { + return this.innerModel().rampDownMinutesToWaitOnLogoff(); + } + + public Time offPeakStartTime() { + return this.innerModel().offPeakStartTime(); + } + + public SetStartVMOnConnect offPeakStartVMOnConnect() { + return this.innerModel().offPeakStartVMOnConnect(); + } + + public SessionHandlingOperation offPeakActionOnDisconnect() { + return this.innerModel().offPeakActionOnDisconnect(); + } + + public Integer offPeakMinutesToWaitOnDisconnect() { + return this.innerModel().offPeakMinutesToWaitOnDisconnect(); + } + + public SessionHandlingOperation offPeakActionOnLogoff() { + return this.innerModel().offPeakActionOnLogoff(); + } + + public Integer offPeakMinutesToWaitOnLogoff() { + return this.innerModel().offPeakMinutesToWaitOnLogoff(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ScalingPlanPersonalScheduleInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String scalingPlanName; + + private String scalingPlanScheduleName; + + private ScalingPlanPersonalSchedulePatch updateScalingPlanSchedule; + + public ScalingPlanPersonalScheduleImpl withExistingScalingPlan(String resourceGroupName, String scalingPlanName) { + this.resourceGroupName = resourceGroupName; + this.scalingPlanName = scalingPlanName; + return this; + } + + public ScalingPlanPersonalSchedule create() { + this.innerObject = + serviceManager + .serviceClient() + .getScalingPlanPersonalSchedules() + .createWithResponse( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public ScalingPlanPersonalSchedule create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getScalingPlanPersonalSchedules() + .createWithResponse( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, this.innerModel(), context) + .getValue(); + return this; + } + + ScalingPlanPersonalScheduleImpl( + String name, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + this.innerObject = new ScalingPlanPersonalScheduleInner(); + this.serviceManager = serviceManager; + this.scalingPlanScheduleName = name; + } + + public ScalingPlanPersonalScheduleImpl update() { + this.updateScalingPlanSchedule = new ScalingPlanPersonalSchedulePatch(); + return this; + } + + public ScalingPlanPersonalSchedule apply() { + this.innerObject = + serviceManager + .serviceClient() + .getScalingPlanPersonalSchedules() + .updateWithResponse( + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + updateScalingPlanSchedule, + Context.NONE) + .getValue(); + return this; + } + + public ScalingPlanPersonalSchedule apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getScalingPlanPersonalSchedules() + .updateWithResponse( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, updateScalingPlanSchedule, context) + .getValue(); + return this; + } + + ScalingPlanPersonalScheduleImpl( + ScalingPlanPersonalScheduleInner innerObject, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.scalingPlanName = Utils.getValueFromIdByName(innerObject.id(), "scalingPlans"); + this.scalingPlanScheduleName = Utils.getValueFromIdByName(innerObject.id(), "personalSchedules"); + } + + public ScalingPlanPersonalSchedule refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getScalingPlanPersonalSchedules() + .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE) + .getValue(); + return this; + } + + public ScalingPlanPersonalSchedule refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getScalingPlanPersonalSchedules() + .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context) + .getValue(); + return this; + } + + public ScalingPlanPersonalScheduleImpl withDaysOfWeek(List daysOfWeek) { + if (isInCreateMode()) { + this.innerModel().withDaysOfWeek(daysOfWeek); + return this; + } else { + this.updateScalingPlanSchedule.withDaysOfWeek(daysOfWeek); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withRampUpStartTime(Time rampUpStartTime) { + if (isInCreateMode()) { + this.innerModel().withRampUpStartTime(rampUpStartTime); + return this; + } else { + this.updateScalingPlanSchedule.withRampUpStartTime(rampUpStartTime); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withRampUpAutoStartHosts(StartupBehavior rampUpAutoStartHosts) { + if (isInCreateMode()) { + this.innerModel().withRampUpAutoStartHosts(rampUpAutoStartHosts); + return this; + } else { + this.updateScalingPlanSchedule.withRampUpAutoStartHosts(rampUpAutoStartHosts); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withRampUpStartVMOnConnect(SetStartVMOnConnect rampUpStartVMOnConnect) { + if (isInCreateMode()) { + this.innerModel().withRampUpStartVMOnConnect(rampUpStartVMOnConnect); + return this; + } else { + this.updateScalingPlanSchedule.withRampUpStartVMOnConnect(rampUpStartVMOnConnect); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withRampUpActionOnDisconnect( + SessionHandlingOperation rampUpActionOnDisconnect) { + if (isInCreateMode()) { + this.innerModel().withRampUpActionOnDisconnect(rampUpActionOnDisconnect); + return this; + } else { + this.updateScalingPlanSchedule.withRampUpActionOnDisconnect(rampUpActionOnDisconnect); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withRampUpMinutesToWaitOnDisconnect( + Integer rampUpMinutesToWaitOnDisconnect) { + if (isInCreateMode()) { + this.innerModel().withRampUpMinutesToWaitOnDisconnect(rampUpMinutesToWaitOnDisconnect); + return this; + } else { + this.updateScalingPlanSchedule.withRampUpMinutesToWaitOnDisconnect(rampUpMinutesToWaitOnDisconnect); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withRampUpActionOnLogoff(SessionHandlingOperation rampUpActionOnLogoff) { + if (isInCreateMode()) { + this.innerModel().withRampUpActionOnLogoff(rampUpActionOnLogoff); + return this; + } else { + this.updateScalingPlanSchedule.withRampUpActionOnLogoff(rampUpActionOnLogoff); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withRampUpMinutesToWaitOnLogoff(Integer rampUpMinutesToWaitOnLogoff) { + if (isInCreateMode()) { + this.innerModel().withRampUpMinutesToWaitOnLogoff(rampUpMinutesToWaitOnLogoff); + return this; + } else { + this.updateScalingPlanSchedule.withRampUpMinutesToWaitOnLogoff(rampUpMinutesToWaitOnLogoff); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withPeakStartTime(Time peakStartTime) { + if (isInCreateMode()) { + this.innerModel().withPeakStartTime(peakStartTime); + return this; + } else { + this.updateScalingPlanSchedule.withPeakStartTime(peakStartTime); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withPeakStartVMOnConnect(SetStartVMOnConnect peakStartVMOnConnect) { + if (isInCreateMode()) { + this.innerModel().withPeakStartVMOnConnect(peakStartVMOnConnect); + return this; + } else { + this.updateScalingPlanSchedule.withPeakStartVMOnConnect(peakStartVMOnConnect); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withPeakActionOnDisconnect(SessionHandlingOperation peakActionOnDisconnect) { + if (isInCreateMode()) { + this.innerModel().withPeakActionOnDisconnect(peakActionOnDisconnect); + return this; + } else { + this.updateScalingPlanSchedule.withPeakActionOnDisconnect(peakActionOnDisconnect); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withPeakMinutesToWaitOnDisconnect(Integer peakMinutesToWaitOnDisconnect) { + if (isInCreateMode()) { + this.innerModel().withPeakMinutesToWaitOnDisconnect(peakMinutesToWaitOnDisconnect); + return this; + } else { + this.updateScalingPlanSchedule.withPeakMinutesToWaitOnDisconnect(peakMinutesToWaitOnDisconnect); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withPeakActionOnLogoff(SessionHandlingOperation peakActionOnLogoff) { + if (isInCreateMode()) { + this.innerModel().withPeakActionOnLogoff(peakActionOnLogoff); + return this; + } else { + this.updateScalingPlanSchedule.withPeakActionOnLogoff(peakActionOnLogoff); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withPeakMinutesToWaitOnLogoff(Integer peakMinutesToWaitOnLogoff) { + if (isInCreateMode()) { + this.innerModel().withPeakMinutesToWaitOnLogoff(peakMinutesToWaitOnLogoff); + return this; + } else { + this.updateScalingPlanSchedule.withPeakMinutesToWaitOnLogoff(peakMinutesToWaitOnLogoff); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withRampDownStartTime(Time rampDownStartTime) { + if (isInCreateMode()) { + this.innerModel().withRampDownStartTime(rampDownStartTime); + return this; + } else { + this.updateScalingPlanSchedule.withRampDownStartTime(rampDownStartTime); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withRampDownStartVMOnConnect(SetStartVMOnConnect rampDownStartVMOnConnect) { + if (isInCreateMode()) { + this.innerModel().withRampDownStartVMOnConnect(rampDownStartVMOnConnect); + return this; + } else { + this.updateScalingPlanSchedule.withRampDownStartVMOnConnect(rampDownStartVMOnConnect); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withRampDownActionOnDisconnect( + SessionHandlingOperation rampDownActionOnDisconnect) { + if (isInCreateMode()) { + this.innerModel().withRampDownActionOnDisconnect(rampDownActionOnDisconnect); + return this; + } else { + this.updateScalingPlanSchedule.withRampDownActionOnDisconnect(rampDownActionOnDisconnect); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withRampDownMinutesToWaitOnDisconnect( + Integer rampDownMinutesToWaitOnDisconnect) { + if (isInCreateMode()) { + this.innerModel().withRampDownMinutesToWaitOnDisconnect(rampDownMinutesToWaitOnDisconnect); + return this; + } else { + this.updateScalingPlanSchedule.withRampDownMinutesToWaitOnDisconnect(rampDownMinutesToWaitOnDisconnect); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withRampDownActionOnLogoff(SessionHandlingOperation rampDownActionOnLogoff) { + if (isInCreateMode()) { + this.innerModel().withRampDownActionOnLogoff(rampDownActionOnLogoff); + return this; + } else { + this.updateScalingPlanSchedule.withRampDownActionOnLogoff(rampDownActionOnLogoff); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withRampDownMinutesToWaitOnLogoff(Integer rampDownMinutesToWaitOnLogoff) { + if (isInCreateMode()) { + this.innerModel().withRampDownMinutesToWaitOnLogoff(rampDownMinutesToWaitOnLogoff); + return this; + } else { + this.updateScalingPlanSchedule.withRampDownMinutesToWaitOnLogoff(rampDownMinutesToWaitOnLogoff); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withOffPeakStartTime(Time offPeakStartTime) { + if (isInCreateMode()) { + this.innerModel().withOffPeakStartTime(offPeakStartTime); + return this; + } else { + this.updateScalingPlanSchedule.withOffPeakStartTime(offPeakStartTime); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withOffPeakStartVMOnConnect(SetStartVMOnConnect offPeakStartVMOnConnect) { + if (isInCreateMode()) { + this.innerModel().withOffPeakStartVMOnConnect(offPeakStartVMOnConnect); + return this; + } else { + this.updateScalingPlanSchedule.withOffPeakStartVMOnConnect(offPeakStartVMOnConnect); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withOffPeakActionOnDisconnect( + SessionHandlingOperation offPeakActionOnDisconnect) { + if (isInCreateMode()) { + this.innerModel().withOffPeakActionOnDisconnect(offPeakActionOnDisconnect); + return this; + } else { + this.updateScalingPlanSchedule.withOffPeakActionOnDisconnect(offPeakActionOnDisconnect); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withOffPeakMinutesToWaitOnDisconnect( + Integer offPeakMinutesToWaitOnDisconnect) { + if (isInCreateMode()) { + this.innerModel().withOffPeakMinutesToWaitOnDisconnect(offPeakMinutesToWaitOnDisconnect); + return this; + } else { + this.updateScalingPlanSchedule.withOffPeakMinutesToWaitOnDisconnect(offPeakMinutesToWaitOnDisconnect); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withOffPeakActionOnLogoff(SessionHandlingOperation offPeakActionOnLogoff) { + if (isInCreateMode()) { + this.innerModel().withOffPeakActionOnLogoff(offPeakActionOnLogoff); + return this; + } else { + this.updateScalingPlanSchedule.withOffPeakActionOnLogoff(offPeakActionOnLogoff); + return this; + } + } + + public ScalingPlanPersonalScheduleImpl withOffPeakMinutesToWaitOnLogoff(Integer offPeakMinutesToWaitOnLogoff) { + if (isInCreateMode()) { + this.innerModel().withOffPeakMinutesToWaitOnLogoff(offPeakMinutesToWaitOnLogoff); + return this; + } else { + this.updateScalingPlanSchedule.withOffPeakMinutesToWaitOnLogoff(offPeakMinutesToWaitOnLogoff); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesClientImpl.java new file mode 100644 index 000000000000..9003c60dcb0e --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesClientImpl.java @@ -0,0 +1,1197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.desktopvirtualization.fluent.ScalingPlanPersonalSchedulesClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalScheduleList; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedulePatch; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ScalingPlanPersonalSchedulesClient. */ +public final class ScalingPlanPersonalSchedulesClientImpl implements ScalingPlanPersonalSchedulesClient { + /** The proxy service used to perform REST calls. */ + private final ScalingPlanPersonalSchedulesService service; + + /** The service client containing this operation class. */ + private final DesktopVirtualizationApiClientImpl client; + + /** + * Initializes an instance of ScalingPlanPersonalSchedulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ScalingPlanPersonalSchedulesClientImpl(DesktopVirtualizationApiClientImpl client) { + this.service = + RestProxy + .create( + ScalingPlanPersonalSchedulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DesktopVirtualizationApiClientScalingPlanPersonalSchedules to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DesktopVirtualizatio") + public interface ScalingPlanPersonalSchedulesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("scalingPlanName") String scalingPlanName, + @PathParam("scalingPlanScheduleName") String scalingPlanScheduleName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> create( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("scalingPlanName") String scalingPlanName, + @PathParam("scalingPlanScheduleName") String scalingPlanScheduleName, + @BodyParam("application/json") ScalingPlanPersonalScheduleInner scalingPlanSchedule, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("scalingPlanName") String scalingPlanName, + @PathParam("scalingPlanScheduleName") String scalingPlanScheduleName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("scalingPlanName") String scalingPlanName, + @PathParam("scalingPlanScheduleName") String scalingPlanScheduleName, + @BodyParam("application/json") ScalingPlanPersonalSchedulePatch scalingPlanSchedule, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("scalingPlanName") String scalingPlanName, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPersonalSchedule along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPersonalSchedule along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + accept, + context); + } + + /** + * Get a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPersonalSchedule on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + return getWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPersonalSchedule along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + return getWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context).block(); + } + + /** + * Get a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPersonalSchedule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScalingPlanPersonalScheduleInner get( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + return getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE).getValue(); + } + + /** + * Create or update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPersonalScheduleInner scalingPlanSchedule) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + if (scalingPlanSchedule == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanSchedule is required and cannot be null.")); + } else { + scalingPlanSchedule.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .create( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + scalingPlanSchedule, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPersonalScheduleInner scalingPlanSchedule, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + if (scalingPlanSchedule == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanSchedule is required and cannot be null.")); + } else { + scalingPlanSchedule.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .create( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + scalingPlanSchedule, + accept, + context); + } + + /** + * Create or update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPersonalScheduleInner scalingPlanSchedule) { + return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create or update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createWithResponse( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPersonalScheduleInner scalingPlanSchedule, + Context context) { + return createWithResponseAsync( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, context) + .block(); + } + + /** + * Create or update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScalingPlanPersonalScheduleInner create( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPersonalScheduleInner scalingPlanSchedule) { + return createWithResponse( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, Context.NONE) + .getValue(); + } + + /** + * Remove a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Remove a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + accept, + context); + } + + /** + * Remove a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + return deleteWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Remove a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + return deleteWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context).block(); + } + + /** + * Remove a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + deleteWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE); + } + + /** + * Update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPersonalSchedulePatch scalingPlanSchedule) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + if (scalingPlanSchedule != null) { + scalingPlanSchedule.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + scalingPlanSchedule, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPersonalSchedulePatch scalingPlanSchedule, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + if (scalingPlanSchedule != null) { + scalingPlanSchedule.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + scalingPlanSchedule, + accept, + context); + } + + /** + * Update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + final ScalingPlanPersonalSchedulePatch scalingPlanSchedule = null; + return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPersonalSchedule definitions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPersonalSchedulePatch scalingPlanSchedule, + Context context) { + return updateWithResponseAsync( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, context) + .block(); + } + + /** + * Update a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPersonalSchedule definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScalingPlanPersonalScheduleInner update( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + final ScalingPlanPersonalSchedulePatch scalingPlanSchedule = null; + return updateWithResponse( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, Context.NONE) + .getValue(); + } + + /** + * List ScalingPlanPersonalSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String scalingPlanName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + pageSize, + isDescending, + initialSkip, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List ScalingPlanPersonalSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String scalingPlanName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + pageSize, + isDescending, + initialSkip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List ScalingPlanPersonalSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync( + String resourceGroupName, String scalingPlanName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List ScalingPlanPersonalSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String scalingPlanName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List ScalingPlanPersonalSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String scalingPlanName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List ScalingPlanPersonalSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String scalingPlanName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip)); + } + + /** + * List ScalingPlanPersonalSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String scalingPlanName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesImpl.java new file mode 100644 index 000000000000..2624a4702113 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesImpl.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.desktopvirtualization.fluent.ScalingPlanPersonalSchedulesClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedule; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedules; + +public final class ScalingPlanPersonalSchedulesImpl implements ScalingPlanPersonalSchedules { + private static final ClientLogger LOGGER = new ClientLogger(ScalingPlanPersonalSchedulesImpl.class); + + private final ScalingPlanPersonalSchedulesClient innerClient; + + private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; + + public ScalingPlanPersonalSchedulesImpl( + ScalingPlanPersonalSchedulesClient innerClient, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ScalingPlanPersonalScheduleImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ScalingPlanPersonalSchedule get( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + ScalingPlanPersonalScheduleInner inner = + this.serviceClient().get(resourceGroupName, scalingPlanName, scalingPlanScheduleName); + if (inner != null) { + return new ScalingPlanPersonalScheduleImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context); + } + + public void delete(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + this.serviceClient().delete(resourceGroupName, scalingPlanName, scalingPlanScheduleName); + } + + public PagedIterable list(String resourceGroupName, String scalingPlanName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, scalingPlanName); + return Utils.mapPage(inner, inner1 -> new ScalingPlanPersonalScheduleImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String scalingPlanName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip, context); + return Utils.mapPage(inner, inner1 -> new ScalingPlanPersonalScheduleImpl(inner1, this.manager())); + } + + public ScalingPlanPersonalSchedule getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String scalingPlanName = Utils.getValueFromIdByName(id, "scalingPlans"); + if (scalingPlanName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id))); + } + String scalingPlanScheduleName = Utils.getValueFromIdByName(id, "personalSchedules"); + if (scalingPlanScheduleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id))); + } + return this + .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String scalingPlanName = Utils.getValueFromIdByName(id, "scalingPlans"); + if (scalingPlanName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id))); + } + String scalingPlanScheduleName = Utils.getValueFromIdByName(id, "personalSchedules"); + if (scalingPlanScheduleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id))); + } + return this.getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String scalingPlanName = Utils.getValueFromIdByName(id, "scalingPlans"); + if (scalingPlanName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id))); + } + String scalingPlanScheduleName = Utils.getValueFromIdByName(id, "personalSchedules"); + if (scalingPlanScheduleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id))); + } + this.deleteWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String scalingPlanName = Utils.getValueFromIdByName(id, "scalingPlans"); + if (scalingPlanName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id))); + } + String scalingPlanScheduleName = Utils.getValueFromIdByName(id, "personalSchedules"); + if (scalingPlanScheduleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id))); + } + return this.deleteWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context); + } + + private ScalingPlanPersonalSchedulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() { + return this.serviceManager; + } + + public ScalingPlanPersonalScheduleImpl define(String name) { + return new ScalingPlanPersonalScheduleImpl(name, this.manager()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspaceImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspaceImpl.java index 40c3c915ac96..a8176e9298ae 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspaceImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspaceImpl.java @@ -8,6 +8,8 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; +import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetSku; @@ -100,6 +102,19 @@ public Boolean cloudPcResource() { return this.innerModel().cloudPcResource(); } + public PublicNetworkAccess publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public List privateEndpointConnections() { + List inner = this.innerModel().privateEndpointConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public Region region() { return Region.fromName(this.regionName()); } @@ -287,6 +302,16 @@ public WorkspaceImpl withApplicationGroupReferences(List applicationGrou } } + public WorkspaceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + if (isInCreateMode()) { + this.innerModel().withPublicNetworkAccess(publicNetworkAccess); + return this; + } else { + this.updateWorkspace.withPublicNetworkAccess(publicNetworkAccess); + return this; + } + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Application.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Application.java index c4065a3b7c51..56d9578bed4f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Application.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Application.java @@ -160,11 +160,13 @@ interface Definition DefinitionStages.WithCommandLineSetting, DefinitionStages.WithCreate { } + /** The Application definition stages. */ interface DefinitionStages { /** The first stage of the Application definition. */ interface Blank extends WithParentResource { } + /** The stage of the Application definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -176,6 +178,7 @@ interface WithParentResource { */ WithCommandLineSetting withExistingApplicationGroup(String resourceGroupName, String applicationGroupName); } + /** The stage of the Application definition allowing to specify commandLineSetting. */ interface WithCommandLineSetting { /** @@ -190,6 +193,7 @@ interface WithCommandLineSetting { */ WithCreate withCommandLineSetting(CommandLineSetting commandLineSetting); } + /** * The stage of the Application definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. @@ -220,6 +224,7 @@ interface WithCreate */ Application create(Context context); } + /** The stage of the Application definition allowing to specify description. */ interface WithDescription { /** @@ -230,6 +235,7 @@ interface WithDescription { */ WithCreate withDescription(String description); } + /** The stage of the Application definition allowing to specify friendlyName. */ interface WithFriendlyName { /** @@ -240,6 +246,7 @@ interface WithFriendlyName { */ WithCreate withFriendlyName(String friendlyName); } + /** The stage of the Application definition allowing to specify filePath. */ interface WithFilePath { /** @@ -250,6 +257,7 @@ interface WithFilePath { */ WithCreate withFilePath(String filePath); } + /** The stage of the Application definition allowing to specify msixPackageFamilyName. */ interface WithMsixPackageFamilyName { /** @@ -260,6 +268,7 @@ interface WithMsixPackageFamilyName { */ WithCreate withMsixPackageFamilyName(String msixPackageFamilyName); } + /** The stage of the Application definition allowing to specify msixPackageApplicationId. */ interface WithMsixPackageApplicationId { /** @@ -271,6 +280,7 @@ interface WithMsixPackageApplicationId { */ WithCreate withMsixPackageApplicationId(String msixPackageApplicationId); } + /** The stage of the Application definition allowing to specify applicationType. */ interface WithApplicationType { /** @@ -281,6 +291,7 @@ interface WithApplicationType { */ WithCreate withApplicationType(RemoteApplicationType applicationType); } + /** The stage of the Application definition allowing to specify commandLineArguments. */ interface WithCommandLineArguments { /** @@ -291,6 +302,7 @@ interface WithCommandLineArguments { */ WithCreate withCommandLineArguments(String commandLineArguments); } + /** The stage of the Application definition allowing to specify showInPortal. */ interface WithShowInPortal { /** @@ -302,6 +314,7 @@ interface WithShowInPortal { */ WithCreate withShowInPortal(Boolean showInPortal); } + /** The stage of the Application definition allowing to specify iconPath. */ interface WithIconPath { /** @@ -312,6 +325,7 @@ interface WithIconPath { */ WithCreate withIconPath(String iconPath); } + /** The stage of the Application definition allowing to specify iconIndex. */ interface WithIconIndex { /** @@ -323,6 +337,7 @@ interface WithIconIndex { WithCreate withIconIndex(Integer iconIndex); } } + /** * Begins update for the Application resource. * @@ -359,6 +374,7 @@ interface Update */ Application apply(Context context); } + /** The Application update stages. */ interface UpdateStages { /** The stage of the Application update allowing to specify tags. */ @@ -371,6 +387,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the Application update allowing to specify description. */ interface WithDescription { /** @@ -381,6 +398,7 @@ interface WithDescription { */ Update withDescription(String description); } + /** The stage of the Application update allowing to specify friendlyName. */ interface WithFriendlyName { /** @@ -391,6 +409,7 @@ interface WithFriendlyName { */ Update withFriendlyName(String friendlyName); } + /** The stage of the Application update allowing to specify filePath. */ interface WithFilePath { /** @@ -401,6 +420,7 @@ interface WithFilePath { */ Update withFilePath(String filePath); } + /** The stage of the Application update allowing to specify commandLineSetting. */ interface WithCommandLineSetting { /** @@ -415,6 +435,7 @@ interface WithCommandLineSetting { */ Update withCommandLineSetting(CommandLineSetting commandLineSetting); } + /** The stage of the Application update allowing to specify commandLineArguments. */ interface WithCommandLineArguments { /** @@ -425,6 +446,7 @@ interface WithCommandLineArguments { */ Update withCommandLineArguments(String commandLineArguments); } + /** The stage of the Application update allowing to specify showInPortal. */ interface WithShowInPortal { /** @@ -436,6 +458,7 @@ interface WithShowInPortal { */ Update withShowInPortal(Boolean showInPortal); } + /** The stage of the Application update allowing to specify iconPath. */ interface WithIconPath { /** @@ -446,6 +469,7 @@ interface WithIconPath { */ Update withIconPath(String iconPath); } + /** The stage of the Application update allowing to specify iconIndex. */ interface WithIconIndex { /** @@ -456,6 +480,7 @@ interface WithIconIndex { */ Update withIconIndex(Integer iconIndex); } + /** The stage of the Application update allowing to specify msixPackageFamilyName. */ interface WithMsixPackageFamilyName { /** @@ -466,6 +491,7 @@ interface WithMsixPackageFamilyName { */ Update withMsixPackageFamilyName(String msixPackageFamilyName); } + /** The stage of the Application update allowing to specify msixPackageApplicationId. */ interface WithMsixPackageApplicationId { /** @@ -477,6 +503,7 @@ interface WithMsixPackageApplicationId { */ Update withMsixPackageApplicationId(String msixPackageApplicationId); } + /** The stage of the Application update allowing to specify applicationType. */ interface WithApplicationType { /** @@ -488,6 +515,7 @@ interface WithApplicationType { Update withApplicationType(RemoteApplicationType applicationType); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroup.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroup.java index a82821fda101..5c8769c4ada6 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroup.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroup.java @@ -152,6 +152,13 @@ public interface ApplicationGroup { */ Boolean cloudPcResource(); + /** + * Gets the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. + * + * @return the showInFeed value. + */ + Boolean showInFeed(); + /** * Gets the region of the resource. * @@ -189,11 +196,13 @@ interface Definition DefinitionStages.WithApplicationGroupType, DefinitionStages.WithCreate { } + /** The ApplicationGroup definition stages. */ interface DefinitionStages { /** The first stage of the ApplicationGroup definition. */ interface Blank extends WithLocation { } + /** The stage of the ApplicationGroup definition allowing to specify location. */ interface WithLocation { /** @@ -212,6 +221,7 @@ interface WithLocation { */ WithResourceGroup withRegion(String location); } + /** The stage of the ApplicationGroup definition allowing to specify parent resource. */ interface WithResourceGroup { /** @@ -222,6 +232,7 @@ interface WithResourceGroup { */ WithHostPoolArmPath withExistingResourceGroup(String resourceGroupName); } + /** The stage of the ApplicationGroup definition allowing to specify hostPoolArmPath. */ interface WithHostPoolArmPath { /** @@ -232,6 +243,7 @@ interface WithHostPoolArmPath { */ WithApplicationGroupType withHostPoolArmPath(String hostPoolArmPath); } + /** The stage of the ApplicationGroup definition allowing to specify applicationGroupType. */ interface WithApplicationGroupType { /** @@ -242,6 +254,7 @@ interface WithApplicationGroupType { */ WithCreate withApplicationGroupType(ApplicationGroupType applicationGroupType); } + /** * The stage of the ApplicationGroup definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. @@ -254,7 +267,8 @@ interface WithCreate DefinitionStages.WithSku, DefinitionStages.WithPlan, DefinitionStages.WithDescription, - DefinitionStages.WithFriendlyName { + DefinitionStages.WithFriendlyName, + DefinitionStages.WithShowInFeed { /** * Executes the create request. * @@ -270,6 +284,7 @@ interface WithCreate */ ApplicationGroup create(Context context); } + /** The stage of the ApplicationGroup definition allowing to specify tags. */ interface WithTags { /** @@ -280,6 +295,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the ApplicationGroup definition allowing to specify managedBy. */ interface WithManagedBy { /** @@ -295,6 +311,7 @@ interface WithManagedBy { */ WithCreate withManagedBy(String managedBy); } + /** The stage of the ApplicationGroup definition allowing to specify kind. */ interface WithKind { /** @@ -309,6 +326,7 @@ interface WithKind { */ WithCreate withKind(String kind); } + /** The stage of the ApplicationGroup definition allowing to specify identity. */ interface WithIdentity { /** @@ -319,6 +337,7 @@ interface WithIdentity { */ WithCreate withIdentity(ResourceModelWithAllowedPropertySetIdentity identity); } + /** The stage of the ApplicationGroup definition allowing to specify sku. */ interface WithSku { /** @@ -329,6 +348,7 @@ interface WithSku { */ WithCreate withSku(ResourceModelWithAllowedPropertySetSku sku); } + /** The stage of the ApplicationGroup definition allowing to specify plan. */ interface WithPlan { /** @@ -339,6 +359,7 @@ interface WithPlan { */ WithCreate withPlan(ResourceModelWithAllowedPropertySetPlan plan); } + /** The stage of the ApplicationGroup definition allowing to specify description. */ interface WithDescription { /** @@ -349,6 +370,7 @@ interface WithDescription { */ WithCreate withDescription(String description); } + /** The stage of the ApplicationGroup definition allowing to specify friendlyName. */ interface WithFriendlyName { /** @@ -359,7 +381,20 @@ interface WithFriendlyName { */ WithCreate withFriendlyName(String friendlyName); } + + /** The stage of the ApplicationGroup definition allowing to specify showInFeed. */ + interface WithShowInFeed { + /** + * Specifies the showInFeed property: Boolean representing whether the applicationGroup is show in the + * feed.. + * + * @param showInFeed Boolean representing whether the applicationGroup is show in the feed. + * @return the next definition stage. + */ + WithCreate withShowInFeed(Boolean showInFeed); + } } + /** * Begins update for the ApplicationGroup resource. * @@ -368,7 +403,11 @@ interface WithFriendlyName { ApplicationGroup.Update update(); /** The template for ApplicationGroup update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithDescription, UpdateStages.WithFriendlyName { + interface Update + extends UpdateStages.WithTags, + UpdateStages.WithDescription, + UpdateStages.WithFriendlyName, + UpdateStages.WithShowInFeed { /** * Executes the update request. * @@ -384,6 +423,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithDescription, Up */ ApplicationGroup apply(Context context); } + /** The ApplicationGroup update stages. */ interface UpdateStages { /** The stage of the ApplicationGroup update allowing to specify tags. */ @@ -396,6 +436,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the ApplicationGroup update allowing to specify description. */ interface WithDescription { /** @@ -406,6 +447,7 @@ interface WithDescription { */ Update withDescription(String description); } + /** The stage of the ApplicationGroup update allowing to specify friendlyName. */ interface WithFriendlyName { /** @@ -416,7 +458,20 @@ interface WithFriendlyName { */ Update withFriendlyName(String friendlyName); } + + /** The stage of the ApplicationGroup update allowing to specify showInFeed. */ + interface WithShowInFeed { + /** + * Specifies the showInFeed property: Boolean representing whether the applicationGroup is show in the + * feed.. + * + * @param showInFeed Boolean representing whether the applicationGroup is show in the feed. + * @return the next definition stage. + */ + Update withShowInFeed(Boolean showInFeed); + } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupPatch.java index 61e0c0ad0f32..015db48e8ec1 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupPatch.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupPatch.java @@ -106,6 +106,29 @@ public ApplicationGroupPatch withFriendlyName(String friendlyName) { return this; } + /** + * Get the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. + * + * @return the showInFeed value. + */ + public Boolean showInFeed() { + return this.innerProperties() == null ? null : this.innerProperties().showInFeed(); + } + + /** + * Set the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. + * + * @param showInFeed the showInFeed value to set. + * @return the ApplicationGroupPatch object itself. + */ + public ApplicationGroupPatch withShowInFeed(Boolean showInFeed) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationGroupPatchProperties(); + } + this.innerProperties().withShowInFeed(showInFeed); + return this; + } + /** * Validates the instance. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPool.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPool.java index 01c3b5324d2d..2e2df0ffcb0b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPool.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPool.java @@ -248,6 +248,14 @@ public interface HostPool { */ Boolean cloudPcResource(); + /** + * Gets the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private + * networks, Disabled allows this resource to only be accessed via private endpoints. + * + * @return the publicNetworkAccess value. + */ + HostpoolPublicNetworkAccess publicNetworkAccess(); + /** * Gets the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack * component. @@ -256,6 +264,14 @@ public interface HostPool { */ AgentUpdateProperties agentUpdate(); + /** + * Gets the privateEndpointConnections property: List of private endpoint connection associated with the specified + * resource. + * + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); + /** * Gets the region of the resource. * @@ -294,11 +310,13 @@ interface Definition DefinitionStages.WithPreferredAppGroupType, DefinitionStages.WithCreate { } + /** The HostPool definition stages. */ interface DefinitionStages { /** The first stage of the HostPool definition. */ interface Blank extends WithLocation { } + /** The stage of the HostPool definition allowing to specify location. */ interface WithLocation { /** @@ -317,6 +335,7 @@ interface WithLocation { */ WithResourceGroup withRegion(String location); } + /** The stage of the HostPool definition allowing to specify parent resource. */ interface WithResourceGroup { /** @@ -327,6 +346,7 @@ interface WithResourceGroup { */ WithHostPoolType withExistingResourceGroup(String resourceGroupName); } + /** The stage of the HostPool definition allowing to specify hostPoolType. */ interface WithHostPoolType { /** @@ -337,6 +357,7 @@ interface WithHostPoolType { */ WithLoadBalancerType withHostPoolType(HostPoolType hostPoolType); } + /** The stage of the HostPool definition allowing to specify loadBalancerType. */ interface WithLoadBalancerType { /** @@ -347,6 +368,7 @@ interface WithLoadBalancerType { */ WithPreferredAppGroupType withLoadBalancerType(LoadBalancerType loadBalancerType); } + /** The stage of the HostPool definition allowing to specify preferredAppGroupType. */ interface WithPreferredAppGroupType { /** @@ -359,6 +381,7 @@ interface WithPreferredAppGroupType { */ WithCreate withPreferredAppGroupType(PreferredAppGroupType preferredAppGroupType); } + /** * The stage of the HostPool definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. @@ -384,6 +407,7 @@ interface WithCreate DefinitionStages.WithSsoClientSecretKeyVaultPath, DefinitionStages.WithSsoSecretType, DefinitionStages.WithStartVMOnConnect, + DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithAgentUpdate { /** * Executes the create request. @@ -400,6 +424,7 @@ interface WithCreate */ HostPool create(Context context); } + /** The stage of the HostPool definition allowing to specify tags. */ interface WithTags { /** @@ -410,6 +435,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the HostPool definition allowing to specify managedBy. */ interface WithManagedBy { /** @@ -425,6 +451,7 @@ interface WithManagedBy { */ WithCreate withManagedBy(String managedBy); } + /** The stage of the HostPool definition allowing to specify kind. */ interface WithKind { /** @@ -439,6 +466,7 @@ interface WithKind { */ WithCreate withKind(String kind); } + /** The stage of the HostPool definition allowing to specify identity. */ interface WithIdentity { /** @@ -449,6 +477,7 @@ interface WithIdentity { */ WithCreate withIdentity(ResourceModelWithAllowedPropertySetIdentity identity); } + /** The stage of the HostPool definition allowing to specify sku. */ interface WithSku { /** @@ -459,6 +488,7 @@ interface WithSku { */ WithCreate withSku(ResourceModelWithAllowedPropertySetSku sku); } + /** The stage of the HostPool definition allowing to specify plan. */ interface WithPlan { /** @@ -469,6 +499,7 @@ interface WithPlan { */ WithCreate withPlan(ResourceModelWithAllowedPropertySetPlan plan); } + /** The stage of the HostPool definition allowing to specify friendlyName. */ interface WithFriendlyName { /** @@ -479,6 +510,7 @@ interface WithFriendlyName { */ WithCreate withFriendlyName(String friendlyName); } + /** The stage of the HostPool definition allowing to specify description. */ interface WithDescription { /** @@ -489,6 +521,7 @@ interface WithDescription { */ WithCreate withDescription(String description); } + /** The stage of the HostPool definition allowing to specify personalDesktopAssignmentType. */ interface WithPersonalDesktopAssignmentType { /** @@ -499,6 +532,7 @@ interface WithPersonalDesktopAssignmentType { */ WithCreate withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType); } + /** The stage of the HostPool definition allowing to specify customRdpProperty. */ interface WithCustomRdpProperty { /** @@ -509,6 +543,7 @@ interface WithCustomRdpProperty { */ WithCreate withCustomRdpProperty(String customRdpProperty); } + /** The stage of the HostPool definition allowing to specify maxSessionLimit. */ interface WithMaxSessionLimit { /** @@ -519,6 +554,7 @@ interface WithMaxSessionLimit { */ WithCreate withMaxSessionLimit(Integer maxSessionLimit); } + /** The stage of the HostPool definition allowing to specify ring. */ interface WithRing { /** @@ -529,6 +565,7 @@ interface WithRing { */ WithCreate withRing(Integer ring); } + /** The stage of the HostPool definition allowing to specify validationEnvironment. */ interface WithValidationEnvironment { /** @@ -539,6 +576,7 @@ interface WithValidationEnvironment { */ WithCreate withValidationEnvironment(Boolean validationEnvironment); } + /** The stage of the HostPool definition allowing to specify registrationInfo. */ interface WithRegistrationInfo { /** @@ -549,6 +587,7 @@ interface WithRegistrationInfo { */ WithCreate withRegistrationInfo(RegistrationInfoInner registrationInfo); } + /** The stage of the HostPool definition allowing to specify vmTemplate. */ interface WithVmTemplate { /** @@ -559,6 +598,7 @@ interface WithVmTemplate { */ WithCreate withVmTemplate(String vmTemplate); } + /** The stage of the HostPool definition allowing to specify ssoadfsAuthority. */ interface WithSsoadfsAuthority { /** @@ -569,6 +609,7 @@ interface WithSsoadfsAuthority { */ WithCreate withSsoadfsAuthority(String ssoadfsAuthority); } + /** The stage of the HostPool definition allowing to specify ssoClientId. */ interface WithSsoClientId { /** @@ -580,6 +621,7 @@ interface WithSsoClientId { */ WithCreate withSsoClientId(String ssoClientId); } + /** The stage of the HostPool definition allowing to specify ssoClientSecretKeyVaultPath. */ interface WithSsoClientSecretKeyVaultPath { /** @@ -592,6 +634,7 @@ interface WithSsoClientSecretKeyVaultPath { */ WithCreate withSsoClientSecretKeyVaultPath(String ssoClientSecretKeyVaultPath); } + /** The stage of the HostPool definition allowing to specify ssoSecretType. */ interface WithSsoSecretType { /** @@ -602,6 +645,7 @@ interface WithSsoSecretType { */ WithCreate withSsoSecretType(SsoSecretType ssoSecretType); } + /** The stage of the HostPool definition allowing to specify startVMOnConnect. */ interface WithStartVMOnConnect { /** @@ -612,6 +656,20 @@ interface WithStartVMOnConnect { */ WithCreate withStartVMOnConnect(Boolean startVMOnConnect); } + + /** The stage of the HostPool definition allowing to specify publicNetworkAccess. */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: Enabled allows this resource to be accessed from both public + * and private networks, Disabled allows this resource to only be accessed via private endpoints. + * + * @param publicNetworkAccess Enabled allows this resource to be accessed from both public and private + * networks, Disabled allows this resource to only be accessed via private endpoints. + * @return the next definition stage. + */ + WithCreate withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess); + } + /** The stage of the HostPool definition allowing to specify agentUpdate. */ interface WithAgentUpdate { /** @@ -625,6 +683,7 @@ interface WithAgentUpdate { WithCreate withAgentUpdate(AgentUpdateProperties agentUpdate); } } + /** * Begins update for the HostPool resource. * @@ -651,6 +710,7 @@ interface Update UpdateStages.WithSsoSecretType, UpdateStages.WithPreferredAppGroupType, UpdateStages.WithStartVMOnConnect, + UpdateStages.WithPublicNetworkAccess, UpdateStages.WithAgentUpdate { /** * Executes the update request. @@ -667,6 +727,7 @@ interface Update */ HostPool apply(Context context); } + /** The HostPool update stages. */ interface UpdateStages { /** The stage of the HostPool update allowing to specify tags. */ @@ -679,6 +740,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the HostPool update allowing to specify friendlyName. */ interface WithFriendlyName { /** @@ -689,6 +751,7 @@ interface WithFriendlyName { */ Update withFriendlyName(String friendlyName); } + /** The stage of the HostPool update allowing to specify description. */ interface WithDescription { /** @@ -699,6 +762,7 @@ interface WithDescription { */ Update withDescription(String description); } + /** The stage of the HostPool update allowing to specify customRdpProperty. */ interface WithCustomRdpProperty { /** @@ -709,6 +773,7 @@ interface WithCustomRdpProperty { */ Update withCustomRdpProperty(String customRdpProperty); } + /** The stage of the HostPool update allowing to specify maxSessionLimit. */ interface WithMaxSessionLimit { /** @@ -719,6 +784,7 @@ interface WithMaxSessionLimit { */ Update withMaxSessionLimit(Integer maxSessionLimit); } + /** The stage of the HostPool update allowing to specify personalDesktopAssignmentType. */ interface WithPersonalDesktopAssignmentType { /** @@ -729,6 +795,7 @@ interface WithPersonalDesktopAssignmentType { */ Update withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType); } + /** The stage of the HostPool update allowing to specify loadBalancerType. */ interface WithLoadBalancerType { /** @@ -739,6 +806,7 @@ interface WithLoadBalancerType { */ Update withLoadBalancerType(LoadBalancerType loadBalancerType); } + /** The stage of the HostPool update allowing to specify ring. */ interface WithRing { /** @@ -749,6 +817,7 @@ interface WithRing { */ Update withRing(Integer ring); } + /** The stage of the HostPool update allowing to specify validationEnvironment. */ interface WithValidationEnvironment { /** @@ -759,6 +828,7 @@ interface WithValidationEnvironment { */ Update withValidationEnvironment(Boolean validationEnvironment); } + /** The stage of the HostPool update allowing to specify registrationInfo. */ interface WithRegistrationInfo { /** @@ -769,6 +839,7 @@ interface WithRegistrationInfo { */ Update withRegistrationInfo(RegistrationInfoPatch registrationInfo); } + /** The stage of the HostPool update allowing to specify vmTemplate. */ interface WithVmTemplate { /** @@ -779,6 +850,7 @@ interface WithVmTemplate { */ Update withVmTemplate(String vmTemplate); } + /** The stage of the HostPool update allowing to specify ssoadfsAuthority. */ interface WithSsoadfsAuthority { /** @@ -789,6 +861,7 @@ interface WithSsoadfsAuthority { */ Update withSsoadfsAuthority(String ssoadfsAuthority); } + /** The stage of the HostPool update allowing to specify ssoClientId. */ interface WithSsoClientId { /** @@ -800,6 +873,7 @@ interface WithSsoClientId { */ Update withSsoClientId(String ssoClientId); } + /** The stage of the HostPool update allowing to specify ssoClientSecretKeyVaultPath. */ interface WithSsoClientSecretKeyVaultPath { /** @@ -812,6 +886,7 @@ interface WithSsoClientSecretKeyVaultPath { */ Update withSsoClientSecretKeyVaultPath(String ssoClientSecretKeyVaultPath); } + /** The stage of the HostPool update allowing to specify ssoSecretType. */ interface WithSsoSecretType { /** @@ -822,6 +897,7 @@ interface WithSsoSecretType { */ Update withSsoSecretType(SsoSecretType ssoSecretType); } + /** The stage of the HostPool update allowing to specify preferredAppGroupType. */ interface WithPreferredAppGroupType { /** @@ -834,6 +910,7 @@ interface WithPreferredAppGroupType { */ Update withPreferredAppGroupType(PreferredAppGroupType preferredAppGroupType); } + /** The stage of the HostPool update allowing to specify startVMOnConnect. */ interface WithStartVMOnConnect { /** @@ -844,6 +921,19 @@ interface WithStartVMOnConnect { */ Update withStartVMOnConnect(Boolean startVMOnConnect); } + + /** The stage of the HostPool update allowing to specify publicNetworkAccess. */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: Enabled to allow this resource to be access from the public + * network. + * + * @param publicNetworkAccess Enabled to allow this resource to be access from the public network. + * @return the next definition stage. + */ + Update withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess); + } + /** The stage of the HostPool update allowing to specify agentUpdate. */ interface WithAgentUpdate { /** @@ -857,6 +947,7 @@ interface WithAgentUpdate { Update withAgentUpdate(AgentUpdatePatchProperties agentUpdate); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolPatch.java index 275d159a9302..3732c02ff16f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolPatch.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolPatch.java @@ -433,6 +433,29 @@ public HostPoolPatch withStartVMOnConnect(Boolean startVMOnConnect) { return this; } + /** + * Get the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. + * + * @return the publicNetworkAccess value. + */ + public HostpoolPublicNetworkAccess publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the HostPoolPatch object itself. + */ + public HostPoolPatch withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new HostPoolPatchProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + /** * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack * component. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolProperties.java index 64e474a78172..e93b31ff7770 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolProperties.java @@ -151,6 +151,14 @@ public interface HostPoolProperties { */ Boolean cloudPcResource(); + /** + * Gets the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private + * networks, Disabled allows this resource to only be accessed via private endpoints. + * + * @return the publicNetworkAccess value. + */ + HostpoolPublicNetworkAccess publicNetworkAccess(); + /** * Gets the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack * component. @@ -159,6 +167,14 @@ public interface HostPoolProperties { */ AgentUpdateProperties agentUpdate(); + /** + * Gets the privateEndpointConnections property: List of private endpoint connection associated with the specified + * resource. + * + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); + /** * Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.HostPoolPropertiesInner object. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostpoolPublicNetworkAccess.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostpoolPublicNetworkAccess.java new file mode 100644 index 000000000000..57801eb24489 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostpoolPublicNetworkAccess.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to + * only be accessed via private endpoints. + */ +public final class HostpoolPublicNetworkAccess extends ExpandableStringEnum { + /** Static value Enabled for HostpoolPublicNetworkAccess. */ + public static final HostpoolPublicNetworkAccess ENABLED = fromString("Enabled"); + + /** Static value Disabled for HostpoolPublicNetworkAccess. */ + public static final HostpoolPublicNetworkAccess DISABLED = fromString("Disabled"); + + /** Static value EnabledForSessionHostsOnly for HostpoolPublicNetworkAccess. */ + public static final HostpoolPublicNetworkAccess ENABLED_FOR_SESSION_HOSTS_ONLY = + fromString("EnabledForSessionHostsOnly"); + + /** Static value EnabledForClientsOnly for HostpoolPublicNetworkAccess. */ + public static final HostpoolPublicNetworkAccess ENABLED_FOR_CLIENTS_ONLY = fromString("EnabledForClientsOnly"); + + /** + * Creates a new instance of HostpoolPublicNetworkAccess value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HostpoolPublicNetworkAccess() { + } + + /** + * Creates or finds a HostpoolPublicNetworkAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding HostpoolPublicNetworkAccess. + */ + @JsonCreator + public static HostpoolPublicNetworkAccess fromString(String name) { + return fromString(name, HostpoolPublicNetworkAccess.class); + } + + /** + * Gets known HostpoolPublicNetworkAccess values. + * + * @return known HostpoolPublicNetworkAccess values. + */ + public static Collection values() { + return values(HostpoolPublicNetworkAccess.class); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackage.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackage.java index b156407a4abc..e86c10a6d0e5 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackage.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackage.java @@ -136,11 +136,13 @@ public interface MsixPackage { interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The MsixPackage definition stages. */ interface DefinitionStages { /** The first stage of the MsixPackage definition. */ interface Blank extends WithParentResource { } + /** The stage of the MsixPackage definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -152,6 +154,7 @@ interface WithParentResource { */ WithCreate withExistingHostPool(String resourceGroupName, String hostPoolName); } + /** * The stage of the MsixPackage definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. @@ -183,6 +186,7 @@ interface WithCreate */ MsixPackage create(Context context); } + /** The stage of the MsixPackage definition allowing to specify imagePath. */ interface WithImagePath { /** @@ -193,6 +197,7 @@ interface WithImagePath { */ WithCreate withImagePath(String imagePath); } + /** The stage of the MsixPackage definition allowing to specify packageName. */ interface WithPackageName { /** @@ -203,6 +208,7 @@ interface WithPackageName { */ WithCreate withPackageName(String packageName); } + /** The stage of the MsixPackage definition allowing to specify packageFamilyName. */ interface WithPackageFamilyName { /** @@ -215,6 +221,7 @@ interface WithPackageFamilyName { */ WithCreate withPackageFamilyName(String packageFamilyName); } + /** The stage of the MsixPackage definition allowing to specify displayName. */ interface WithDisplayName { /** @@ -225,6 +232,7 @@ interface WithDisplayName { */ WithCreate withDisplayName(String displayName); } + /** The stage of the MsixPackage definition allowing to specify packageRelativePath. */ interface WithPackageRelativePath { /** @@ -235,6 +243,7 @@ interface WithPackageRelativePath { */ WithCreate withPackageRelativePath(String packageRelativePath); } + /** The stage of the MsixPackage definition allowing to specify isRegularRegistration. */ interface WithIsRegularRegistration { /** @@ -245,6 +254,7 @@ interface WithIsRegularRegistration { */ WithCreate withIsRegularRegistration(Boolean isRegularRegistration); } + /** The stage of the MsixPackage definition allowing to specify isActive. */ interface WithIsActive { /** @@ -255,6 +265,7 @@ interface WithIsActive { */ WithCreate withIsActive(Boolean isActive); } + /** The stage of the MsixPackage definition allowing to specify packageDependencies. */ interface WithPackageDependencies { /** @@ -265,6 +276,7 @@ interface WithPackageDependencies { */ WithCreate withPackageDependencies(List packageDependencies); } + /** The stage of the MsixPackage definition allowing to specify version. */ interface WithVersion { /** @@ -275,6 +287,7 @@ interface WithVersion { */ WithCreate withVersion(String version); } + /** The stage of the MsixPackage definition allowing to specify lastUpdated. */ interface WithLastUpdated { /** @@ -285,6 +298,7 @@ interface WithLastUpdated { */ WithCreate withLastUpdated(OffsetDateTime lastUpdated); } + /** The stage of the MsixPackage definition allowing to specify packageApplications. */ interface WithPackageApplications { /** @@ -296,6 +310,7 @@ interface WithPackageApplications { WithCreate withPackageApplications(List packageApplications); } } + /** * Begins update for the MsixPackage resource. * @@ -321,6 +336,7 @@ interface Update */ MsixPackage apply(Context context); } + /** The MsixPackage update stages. */ interface UpdateStages { /** The stage of the MsixPackage update allowing to specify isActive. */ @@ -333,6 +349,7 @@ interface WithIsActive { */ Update withIsActive(Boolean isActive); } + /** The stage of the MsixPackage update allowing to specify isRegularRegistration. */ interface WithIsRegularRegistration { /** @@ -343,6 +360,7 @@ interface WithIsRegularRegistration { */ Update withIsRegularRegistration(Boolean isRegularRegistration); } + /** The stage of the MsixPackage update allowing to specify displayName. */ interface WithDisplayName { /** @@ -354,6 +372,7 @@ interface WithDisplayName { Update withDisplayName(String displayName); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpoint.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpoint.java new file mode 100644 index 000000000000..f05bf19fa1b7 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpoint.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Private Endpoint resource. */ +@Immutable +public final class PrivateEndpoint { + /* + * The ARM identifier for Private Endpoint + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** Creates an instance of PrivateEndpoint class. */ + public PrivateEndpoint() { + } + + /** + * Get the id property: The ARM identifier for Private Endpoint. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnection.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnection.java new file mode 100644 index 000000000000..40f1ca1cd7b7 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnection.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Private Endpoint Connection resource. */ +@Fluent +public class PrivateEndpointConnection extends ProxyResource { + /* + * Resource properties. + */ + @JsonProperty(value = "properties") + private PrivateEndpointConnectionProperties innerProperties; + + /** Creates an instance of PrivateEndpointConnection class. */ + public PrivateEndpointConnection() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private PrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + } + + /** + * Set the privateEndpoint property: The resource of private end point. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnection object itself. + */ + public PrivateEndpointConnection withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnection object itself. + */ + public PrivateEndpointConnection withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionListResultWithSystemData.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionListResultWithSystemData.java new file mode 100644 index 000000000000..482663f331fb --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionListResultWithSystemData.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of private endpoint connection associated with the specified storage account. */ +@Fluent +public final class PrivateEndpointConnectionListResultWithSystemData { + /* + * Array of private endpoint connections + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next page of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of PrivateEndpointConnectionListResultWithSystemData class. */ + public PrivateEndpointConnectionListResultWithSystemData() { + } + + /** + * Get the value property: Array of private endpoint connections. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of private endpoint connections. + * + * @param value the value value to set. + * @return the PrivateEndpointConnectionListResultWithSystemData object itself. + */ + public PrivateEndpointConnectionListResultWithSystemData withValue( + List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionProvisioningState.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionProvisioningState.java new file mode 100644 index 000000000000..5df9c31ab572 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionProvisioningState.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The current provisioning state. */ +public final class PrivateEndpointConnectionProvisioningState + extends ExpandableStringEnum { + /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Creating for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); + + /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); + + /** Static value Failed for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); + + /** + * Creates a new instance of PrivateEndpointConnectionProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointConnectionProvisioningState() { + } + + /** + * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateEndpointConnectionProvisioningState. + */ + @JsonCreator + public static PrivateEndpointConnectionProvisioningState fromString(String name) { + return fromString(name, PrivateEndpointConnectionProvisioningState.class); + } + + /** + * Gets known PrivateEndpointConnectionProvisioningState values. + * + * @return known PrivateEndpointConnectionProvisioningState values. + */ + public static Collection values() { + return values(PrivateEndpointConnectionProvisioningState.class); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionWithSystemData.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionWithSystemData.java new file mode 100644 index 000000000000..0ae6d5ef7e2e --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionWithSystemData.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner; + +/** An immutable client-side representation of PrivateEndpointConnectionWithSystemData. */ +public interface PrivateEndpointConnectionWithSystemData { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + PrivateEndpoint privateEndpoint(); + + /** + * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); + + /** + * Gets the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + PrivateEndpointConnectionProvisioningState provisioningState(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner + * com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner + * object. + * + * @return the inner object. + */ + PrivateEndpointConnectionWithSystemDataInner innerModel(); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnections.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnections.java new file mode 100644 index 000000000000..e2fad3ebdb73 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnections.java @@ -0,0 +1,278 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of PrivateEndpointConnections. */ +public interface PrivateEndpointConnections { + /** + * List private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + PagedIterable listByWorkspace( + String resourceGroupName, String workspaceName); + + /** + * List private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + PagedIterable listByWorkspace( + String resourceGroupName, String workspaceName, Context context); + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + Response getByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. + */ + PrivateEndpointConnectionWithSystemData getByWorkspace( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByWorkspace(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response}. + */ + Response updateByWorkspaceWithResponse( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection, + Context context); + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + PrivateEndpointConnectionWithSystemData updateByWorkspace( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection); + + /** + * List private endpoint connections associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + PagedIterable listByHostPool( + String resourceGroupName, String hostPoolName); + + /** + * List private endpoint connections associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection along with {@link Response}. + */ + Response getByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); + + /** + * Get a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. + */ + PrivateEndpointConnectionWithSystemData getByHostPool( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); + + /** + * Remove a connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByHostPool(String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response}. + */ + Response updateByHostPoolWithResponse( + String resourceGroupName, + String hostPoolName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection, + Context context); + + /** + * Approve or reject a private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param connection Object containing the updated connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + PrivateEndpointConnectionWithSystemData updateByHostPool( + String resourceGroupName, + String hostPoolName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointServiceConnectionStatus.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointServiceConnectionStatus.java new file mode 100644 index 000000000000..0dc90042b176 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointServiceConnectionStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The private endpoint connection status. */ +public final class PrivateEndpointServiceConnectionStatus + extends ExpandableStringEnum { + /** Static value Pending for PrivateEndpointServiceConnectionStatus. */ + public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); + + /** Static value Approved for PrivateEndpointServiceConnectionStatus. */ + public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); + + /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */ + public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); + + /** + * Creates a new instance of PrivateEndpointServiceConnectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointServiceConnectionStatus() { + } + + /** + * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateEndpointServiceConnectionStatus. + */ + @JsonCreator + public static PrivateEndpointServiceConnectionStatus fromString(String name) { + return fromString(name, PrivateEndpointServiceConnectionStatus.class); + } + + /** + * Gets known PrivateEndpointServiceConnectionStatus values. + * + * @return known PrivateEndpointServiceConnectionStatus values. + */ + public static Collection values() { + return values(PrivateEndpointServiceConnectionStatus.class); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResource.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResource.java new file mode 100644 index 000000000000..33100e2656b9 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResource.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; +import java.util.List; + +/** An immutable client-side representation of PrivateLinkResource. */ +public interface PrivateLinkResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + String groupId(); + + /** + * Gets the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + List requiredMembers(); + + /** + * Gets the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + List requiredZoneNames(); + + /** + * Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner object. + * + * @return the inner object. + */ + PrivateLinkResourceInner innerModel(); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResourceListResult.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResourceListResult.java new file mode 100644 index 000000000000..24165f968933 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResourceListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A list of private link resources. */ +@Fluent +public final class PrivateLinkResourceListResult { + /* + * Array of private link resources + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next page of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of PrivateLinkResourceListResult class. */ + public PrivateLinkResourceListResult() { + } + + /** + * Get the value property: Array of private link resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of private link resources. + * + * @param value the value value to set. + * @return the PrivateLinkResourceListResult object itself. + */ + public PrivateLinkResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResources.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResources.java new file mode 100644 index 000000000000..c80034b42a09 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResources.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of PrivateLinkResources. */ +public interface PrivateLinkResources { + /** + * List the private link resources available for this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); + + /** + * List the private link resources available for this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkspace( + String resourceGroupName, + String workspaceName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + PagedIterable listByHostPool(String resourceGroupName, String hostPoolName); + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkServiceConnectionState.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkServiceConnectionState.java new file mode 100644 index 000000000000..8c448bf0dcdd --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkServiceConnectionState.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A collection of information about the state of the connection between service consumer and provider. */ +@Fluent +public final class PrivateLinkServiceConnectionState { + /* + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + */ + @JsonProperty(value = "status") + private PrivateEndpointServiceConnectionStatus status; + + /* + * The reason for approval/rejection of the connection. + */ + @JsonProperty(value = "description") + private String description; + + /* + * A message indicating if changes on the service provider require any updates on the consumer. + */ + @JsonProperty(value = "actionsRequired") + private String actionsRequired; + + /** Creates an instance of PrivateLinkServiceConnectionState class. */ + public PrivateLinkServiceConnectionState() { + } + + /** + * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. + * + * @return the status value. + */ + public PrivateEndpointServiceConnectionStatus status() { + return this.status; + } + + /** + * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. + * + * @param status the status value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { + this.status = status; + return this; + } + + /** + * Get the description property: The reason for approval/rejection of the connection. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The reason for approval/rejection of the connection. + * + * @param description the description value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on + * the consumer. + * + * @return the actionsRequired value. + */ + public String actionsRequired() { + return this.actionsRequired; + } + + /** + * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on + * the consumer. + * + * @param actionsRequired the actionsRequired value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { + this.actionsRequired = actionsRequired; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PublicNetworkAccess.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PublicNetworkAccess.java new file mode 100644 index 000000000000..40edec9b3e16 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PublicNetworkAccess.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to + * only be accessed via private endpoints. + */ +public final class PublicNetworkAccess extends ExpandableStringEnum { + /** Static value Enabled for PublicNetworkAccess. */ + public static final PublicNetworkAccess ENABLED = fromString("Enabled"); + + /** Static value Disabled for PublicNetworkAccess. */ + public static final PublicNetworkAccess DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of PublicNetworkAccess value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PublicNetworkAccess() { + } + + /** + * Creates or finds a PublicNetworkAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding PublicNetworkAccess. + */ + @JsonCreator + public static PublicNetworkAccess fromString(String name) { + return fromString(name, PublicNetworkAccess.class); + } + + /** + * Gets known PublicNetworkAccess values. + * + * @return known PublicNetworkAccess values. + */ + public static Collection values() { + return values(PublicNetworkAccess.class); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlan.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlan.java index f20d464d6df4..8077031ca64a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlan.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlan.java @@ -196,11 +196,13 @@ interface Definition DefinitionStages.WithTimeZone, DefinitionStages.WithCreate { } + /** The ScalingPlan definition stages. */ interface DefinitionStages { /** The first stage of the ScalingPlan definition. */ interface Blank extends WithLocation { } + /** The stage of the ScalingPlan definition allowing to specify location. */ interface WithLocation { /** @@ -219,6 +221,7 @@ interface WithLocation { */ WithResourceGroup withRegion(String location); } + /** The stage of the ScalingPlan definition allowing to specify parent resource. */ interface WithResourceGroup { /** @@ -229,6 +232,7 @@ interface WithResourceGroup { */ WithTimeZone withExistingResourceGroup(String resourceGroupName); } + /** The stage of the ScalingPlan definition allowing to specify timeZone. */ interface WithTimeZone { /** @@ -239,6 +243,7 @@ interface WithTimeZone { */ WithCreate withTimeZone(String timeZone); } + /** * The stage of the ScalingPlan definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. @@ -271,6 +276,7 @@ interface WithCreate */ ScalingPlan create(Context context); } + /** The stage of the ScalingPlan definition allowing to specify tags. */ interface WithTags { /** @@ -281,6 +287,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the ScalingPlan definition allowing to specify managedBy. */ interface WithManagedBy { /** @@ -296,6 +303,7 @@ interface WithManagedBy { */ WithCreate withManagedBy(String managedBy); } + /** The stage of the ScalingPlan definition allowing to specify kind. */ interface WithKind { /** @@ -310,6 +318,7 @@ interface WithKind { */ WithCreate withKind(String kind); } + /** The stage of the ScalingPlan definition allowing to specify identity. */ interface WithIdentity { /** @@ -320,6 +329,7 @@ interface WithIdentity { */ WithCreate withIdentity(ResourceModelWithAllowedPropertySetIdentity identity); } + /** The stage of the ScalingPlan definition allowing to specify sku. */ interface WithSku { /** @@ -330,6 +340,7 @@ interface WithSku { */ WithCreate withSku(ResourceModelWithAllowedPropertySetSku sku); } + /** The stage of the ScalingPlan definition allowing to specify plan. */ interface WithPlan { /** @@ -340,6 +351,7 @@ interface WithPlan { */ WithCreate withPlan(ResourceModelWithAllowedPropertySetPlan plan); } + /** The stage of the ScalingPlan definition allowing to specify description. */ interface WithDescription { /** @@ -350,6 +362,7 @@ interface WithDescription { */ WithCreate withDescription(String description); } + /** The stage of the ScalingPlan definition allowing to specify friendlyName. */ interface WithFriendlyName { /** @@ -360,6 +373,7 @@ interface WithFriendlyName { */ WithCreate withFriendlyName(String friendlyName); } + /** The stage of the ScalingPlan definition allowing to specify hostPoolType. */ interface WithHostPoolType { /** @@ -370,6 +384,7 @@ interface WithHostPoolType { */ WithCreate withHostPoolType(ScalingHostPoolType hostPoolType); } + /** The stage of the ScalingPlan definition allowing to specify exclusionTag. */ interface WithExclusionTag { /** @@ -380,6 +395,7 @@ interface WithExclusionTag { */ WithCreate withExclusionTag(String exclusionTag); } + /** The stage of the ScalingPlan definition allowing to specify schedules. */ interface WithSchedules { /** @@ -390,6 +406,7 @@ interface WithSchedules { */ WithCreate withSchedules(List schedules); } + /** The stage of the ScalingPlan definition allowing to specify hostPoolReferences. */ interface WithHostPoolReferences { /** @@ -401,6 +418,7 @@ interface WithHostPoolReferences { WithCreate withHostPoolReferences(List hostPoolReferences); } } + /** * Begins update for the ScalingPlan resource. * @@ -432,6 +450,7 @@ interface Update */ ScalingPlan apply(Context context); } + /** The ScalingPlan update stages. */ interface UpdateStages { /** The stage of the ScalingPlan update allowing to specify tags. */ @@ -444,6 +463,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the ScalingPlan update allowing to specify description. */ interface WithDescription { /** @@ -454,6 +474,7 @@ interface WithDescription { */ Update withDescription(String description); } + /** The stage of the ScalingPlan update allowing to specify friendlyName. */ interface WithFriendlyName { /** @@ -464,6 +485,7 @@ interface WithFriendlyName { */ Update withFriendlyName(String friendlyName); } + /** The stage of the ScalingPlan update allowing to specify timeZone. */ interface WithTimeZone { /** @@ -474,6 +496,7 @@ interface WithTimeZone { */ Update withTimeZone(String timeZone); } + /** The stage of the ScalingPlan update allowing to specify exclusionTag. */ interface WithExclusionTag { /** @@ -484,6 +507,7 @@ interface WithExclusionTag { */ Update withExclusionTag(String exclusionTag); } + /** The stage of the ScalingPlan update allowing to specify schedules. */ interface WithSchedules { /** @@ -494,6 +518,7 @@ interface WithSchedules { */ Update withSchedules(List schedules); } + /** The stage of the ScalingPlan update allowing to specify hostPoolReferences. */ interface WithHostPoolReferences { /** @@ -505,6 +530,7 @@ interface WithHostPoolReferences { Update withHostPoolReferences(List hostPoolReferences); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedule.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedule.java new file mode 100644 index 000000000000..7a899c03a48e --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedule.java @@ -0,0 +1,1049 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner; +import java.util.List; + +/** An immutable client-side representation of ScalingPlanPersonalSchedule. */ +public interface ScalingPlanPersonalSchedule { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the daysOfWeek property: Set of days of the week on which this schedule is active. + * + * @return the daysOfWeek value. + */ + List daysOfWeek(); + + /** + * Gets the rampUpStartTime property: Starting time for ramp up period. + * + * @return the rampUpStartTime value. + */ + Time rampUpStartTime(); + + /** + * Gets the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for personal vms + * in the hostpool. + * + * @return the rampUpAutoStartHosts value. + */ + StartupBehavior rampUpAutoStartHosts(); + + /** + * Gets the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by + * turning them on manually. + * + * @return the rampUpStartVMOnConnect value. + */ + SetStartVMOnConnect rampUpStartVMOnConnect(); + + /** + * Gets the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the ramp up period. + * + * @return the rampUpActionOnDisconnect value. + */ + SessionHandlingOperation rampUpActionOnDisconnect(); + + /** + * Gets the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp up period. + * + * @return the rampUpMinutesToWaitOnDisconnect value. + */ + Integer rampUpMinutesToWaitOnDisconnect(); + + /** + * Gets the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up period. + * + * @return the rampUpActionOnLogoff value. + */ + SessionHandlingOperation rampUpActionOnLogoff(); + + /** + * Gets the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp up period. + * + * @return the rampUpMinutesToWaitOnLogoff value. + */ + Integer rampUpMinutesToWaitOnLogoff(); + + /** + * Gets the peakStartTime property: Starting time for peak period. + * + * @return the peakStartTime value. + */ + Time peakStartTime(); + + /** + * Gets the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during + * the peak phase. + * + * @return the peakStartVMOnConnect value. + */ + SetStartVMOnConnect peakStartVMOnConnect(); + + /** + * Gets the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak period. + * + * @return the peakActionOnDisconnect value. + */ + SessionHandlingOperation peakActionOnDisconnect(); + + /** + * Gets the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the peak period. + * + * @return the peakMinutesToWaitOnDisconnect value. + */ + Integer peakMinutesToWaitOnDisconnect(); + + /** + * Gets the peakActionOnLogoff property: Action to be taken after a logoff during the peak period. + * + * @return the peakActionOnLogoff value. + */ + SessionHandlingOperation peakActionOnLogoff(); + + /** + * Gets the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the peak period. + * + * @return the peakMinutesToWaitOnLogoff value. + */ + Integer peakMinutesToWaitOnLogoff(); + + /** + * Gets the rampDownStartTime property: Starting time for ramp down period. + * + * @return the rampDownStartTime value. + */ + Time rampDownStartTime(); + + /** + * Gets the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the ramp down phase. + * + * @return the rampDownStartVMOnConnect value. + */ + SetStartVMOnConnect rampDownStartVMOnConnect(); + + /** + * Gets the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the ramp down + * period. + * + * @return the rampDownActionOnDisconnect value. + */ + SessionHandlingOperation rampDownActionOnDisconnect(); + + /** + * Gets the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp down period. + * + * @return the rampDownMinutesToWaitOnDisconnect value. + */ + Integer rampDownMinutesToWaitOnDisconnect(); + + /** + * Gets the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down period. + * + * @return the rampDownActionOnLogoff value. + */ + SessionHandlingOperation rampDownActionOnLogoff(); + + /** + * Gets the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired + * session handling action when a user logs off during the ramp down period. + * + * @return the rampDownMinutesToWaitOnLogoff value. + */ + Integer rampDownMinutesToWaitOnLogoff(); + + /** + * Gets the offPeakStartTime property: Starting time for off-peak period. + * + * @return the offPeakStartTime value. + */ + Time offPeakStartTime(); + + /** + * Gets the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the off-peak phase. + * + * @return the offPeakStartVMOnConnect value. + */ + SetStartVMOnConnect offPeakStartVMOnConnect(); + + /** + * Gets the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the off-peak + * period. + * + * @return the offPeakActionOnDisconnect value. + */ + SessionHandlingOperation offPeakActionOnDisconnect(); + + /** + * Gets the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the off-peak period. + * + * @return the offPeakMinutesToWaitOnDisconnect value. + */ + Integer offPeakMinutesToWaitOnDisconnect(); + + /** + * Gets the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak period. + * + * @return the offPeakActionOnLogoff value. + */ + SessionHandlingOperation offPeakActionOnLogoff(); + + /** + * Gets the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the off-peak period. + * + * @return the offPeakMinutesToWaitOnLogoff value. + */ + Integer offPeakMinutesToWaitOnLogoff(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner + * object. + * + * @return the inner object. + */ + ScalingPlanPersonalScheduleInner innerModel(); + + /** The entirety of the ScalingPlanPersonalSchedule definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** The ScalingPlanPersonalSchedule definition stages. */ + interface DefinitionStages { + /** The first stage of the ScalingPlanPersonalSchedule definition. */ + interface Blank extends WithParentResource { + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, scalingPlanName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @return the next definition stage. + */ + WithCreate withExistingScalingPlan(String resourceGroupName, String scalingPlanName); + } + + /** + * The stage of the ScalingPlanPersonalSchedule definition which contains all the minimum required properties + * for the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithDaysOfWeek, + DefinitionStages.WithRampUpStartTime, + DefinitionStages.WithRampUpAutoStartHosts, + DefinitionStages.WithRampUpStartVMOnConnect, + DefinitionStages.WithRampUpActionOnDisconnect, + DefinitionStages.WithRampUpMinutesToWaitOnDisconnect, + DefinitionStages.WithRampUpActionOnLogoff, + DefinitionStages.WithRampUpMinutesToWaitOnLogoff, + DefinitionStages.WithPeakStartTime, + DefinitionStages.WithPeakStartVMOnConnect, + DefinitionStages.WithPeakActionOnDisconnect, + DefinitionStages.WithPeakMinutesToWaitOnDisconnect, + DefinitionStages.WithPeakActionOnLogoff, + DefinitionStages.WithPeakMinutesToWaitOnLogoff, + DefinitionStages.WithRampDownStartTime, + DefinitionStages.WithRampDownStartVMOnConnect, + DefinitionStages.WithRampDownActionOnDisconnect, + DefinitionStages.WithRampDownMinutesToWaitOnDisconnect, + DefinitionStages.WithRampDownActionOnLogoff, + DefinitionStages.WithRampDownMinutesToWaitOnLogoff, + DefinitionStages.WithOffPeakStartTime, + DefinitionStages.WithOffPeakStartVMOnConnect, + DefinitionStages.WithOffPeakActionOnDisconnect, + DefinitionStages.WithOffPeakMinutesToWaitOnDisconnect, + DefinitionStages.WithOffPeakActionOnLogoff, + DefinitionStages.WithOffPeakMinutesToWaitOnLogoff { + /** + * Executes the create request. + * + * @return the created resource. + */ + ScalingPlanPersonalSchedule create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ScalingPlanPersonalSchedule create(Context context); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify daysOfWeek. */ + interface WithDaysOfWeek { + /** + * Specifies the daysOfWeek property: Set of days of the week on which this schedule is active.. + * + * @param daysOfWeek Set of days of the week on which this schedule is active. + * @return the next definition stage. + */ + WithCreate withDaysOfWeek(List daysOfWeek); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpStartTime. */ + interface WithRampUpStartTime { + /** + * Specifies the rampUpStartTime property: Starting time for ramp up period.. + * + * @param rampUpStartTime Starting time for ramp up period. + * @return the next definition stage. + */ + WithCreate withRampUpStartTime(Time rampUpStartTime); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpAutoStartHosts. */ + interface WithRampUpAutoStartHosts { + /** + * Specifies the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for + * personal vms in the hostpool.. + * + * @param rampUpAutoStartHosts The desired startup behavior during the ramp up period for personal vms in + * the hostpool. + * @return the next definition stage. + */ + WithCreate withRampUpAutoStartHosts(StartupBehavior rampUpAutoStartHosts); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpStartVMOnConnect. */ + interface WithRampUpStartVMOnConnect { + /** + * Specifies the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the + * hostpool during the ramp up phase. If this is disabled, session hosts must be turned on using + * rampUpAutoStartHosts or by turning them on manually.. + * + * @param rampUpStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during + * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or + * by turning them on manually. + * @return the next definition stage. + */ + WithCreate withRampUpStartVMOnConnect(SetStartVMOnConnect rampUpStartVMOnConnect); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpActionOnDisconnect. */ + interface WithRampUpActionOnDisconnect { + /** + * Specifies the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the + * ramp up period.. + * + * @param rampUpActionOnDisconnect Action to be taken after a user disconnect during the ramp up period. + * @return the next definition stage. + */ + WithCreate withRampUpActionOnDisconnect(SessionHandlingOperation rampUpActionOnDisconnect); + } + + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpMinutesToWaitOnDisconnect. + */ + interface WithRampUpMinutesToWaitOnDisconnect { + /** + * Specifies the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the + * desired session handling action when a user disconnects during the ramp up period.. + * + * @param rampUpMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session + * handling action when a user disconnects during the ramp up period. + * @return the next definition stage. + */ + WithCreate withRampUpMinutesToWaitOnDisconnect(Integer rampUpMinutesToWaitOnDisconnect); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpActionOnLogoff. */ + interface WithRampUpActionOnLogoff { + /** + * Specifies the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up + * period.. + * + * @param rampUpActionOnLogoff Action to be taken after a logoff during the ramp up period. + * @return the next definition stage. + */ + WithCreate withRampUpActionOnLogoff(SessionHandlingOperation rampUpActionOnLogoff); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpMinutesToWaitOnLogoff. */ + interface WithRampUpMinutesToWaitOnLogoff { + /** + * Specifies the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the + * desired session handling action when a user logs off during the ramp up period.. + * + * @param rampUpMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp up period. + * @return the next definition stage. + */ + WithCreate withRampUpMinutesToWaitOnLogoff(Integer rampUpMinutesToWaitOnLogoff); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakStartTime. */ + interface WithPeakStartTime { + /** + * Specifies the peakStartTime property: Starting time for peak period.. + * + * @param peakStartTime Starting time for peak period. + * @return the next definition stage. + */ + WithCreate withPeakStartTime(Time peakStartTime); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakStartVMOnConnect. */ + interface WithPeakStartVMOnConnect { + /** + * Specifies the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the + * hostpool during the peak phase.. + * + * @param peakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the + * peak phase. + * @return the next definition stage. + */ + WithCreate withPeakStartVMOnConnect(SetStartVMOnConnect peakStartVMOnConnect); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakActionOnDisconnect. */ + interface WithPeakActionOnDisconnect { + /** + * Specifies the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak + * period.. + * + * @param peakActionOnDisconnect Action to be taken after a user disconnect during the peak period. + * @return the next definition stage. + */ + WithCreate withPeakActionOnDisconnect(SessionHandlingOperation peakActionOnDisconnect); + } + + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakMinutesToWaitOnDisconnect. + */ + interface WithPeakMinutesToWaitOnDisconnect { + /** + * Specifies the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the + * desired session handling action when a user disconnects during the peak period.. + * + * @param peakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session + * handling action when a user disconnects during the peak period. + * @return the next definition stage. + */ + WithCreate withPeakMinutesToWaitOnDisconnect(Integer peakMinutesToWaitOnDisconnect); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakActionOnLogoff. */ + interface WithPeakActionOnLogoff { + /** + * Specifies the peakActionOnLogoff property: Action to be taken after a logoff during the peak period.. + * + * @param peakActionOnLogoff Action to be taken after a logoff during the peak period. + * @return the next definition stage. + */ + WithCreate withPeakActionOnLogoff(SessionHandlingOperation peakActionOnLogoff); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakMinutesToWaitOnLogoff. */ + interface WithPeakMinutesToWaitOnLogoff { + /** + * Specifies the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the + * desired session handling action when a user logs off during the peak period.. + * + * @param peakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session + * handling action when a user logs off during the peak period. + * @return the next definition stage. + */ + WithCreate withPeakMinutesToWaitOnLogoff(Integer peakMinutesToWaitOnLogoff); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampDownStartTime. */ + interface WithRampDownStartTime { + /** + * Specifies the rampDownStartTime property: Starting time for ramp down period.. + * + * @param rampDownStartTime Starting time for ramp down period. + * @return the next definition stage. + */ + WithCreate withRampDownStartTime(Time rampDownStartTime); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampDownStartVMOnConnect. */ + interface WithRampDownStartVMOnConnect { + /** + * Specifies the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the + * hostpool during the ramp down phase.. + * + * @param rampDownStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during + * the ramp down phase. + * @return the next definition stage. + */ + WithCreate withRampDownStartVMOnConnect(SetStartVMOnConnect rampDownStartVMOnConnect); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampDownActionOnDisconnect. */ + interface WithRampDownActionOnDisconnect { + /** + * Specifies the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the + * ramp down period.. + * + * @param rampDownActionOnDisconnect Action to be taken after a user disconnect during the ramp down period. + * @return the next definition stage. + */ + WithCreate withRampDownActionOnDisconnect(SessionHandlingOperation rampDownActionOnDisconnect); + } + + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify + * rampDownMinutesToWaitOnDisconnect. + */ + interface WithRampDownMinutesToWaitOnDisconnect { + /** + * Specifies the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing + * the desired session handling action when a user disconnects during the ramp down period.. + * + * @param rampDownMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp down period. + * @return the next definition stage. + */ + WithCreate withRampDownMinutesToWaitOnDisconnect(Integer rampDownMinutesToWaitOnDisconnect); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampDownActionOnLogoff. */ + interface WithRampDownActionOnLogoff { + /** + * Specifies the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down + * period.. + * + * @param rampDownActionOnLogoff Action to be taken after a logoff during the ramp down period. + * @return the next definition stage. + */ + WithCreate withRampDownActionOnLogoff(SessionHandlingOperation rampDownActionOnLogoff); + } + + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampDownMinutesToWaitOnLogoff. + */ + interface WithRampDownMinutesToWaitOnLogoff { + /** + * Specifies the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the + * desired session handling action when a user logs off during the ramp down period.. + * + * @param rampDownMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp down period. + * @return the next definition stage. + */ + WithCreate withRampDownMinutesToWaitOnLogoff(Integer rampDownMinutesToWaitOnLogoff); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakStartTime. */ + interface WithOffPeakStartTime { + /** + * Specifies the offPeakStartTime property: Starting time for off-peak period.. + * + * @param offPeakStartTime Starting time for off-peak period. + * @return the next definition stage. + */ + WithCreate withOffPeakStartTime(Time offPeakStartTime); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakStartVMOnConnect. */ + interface WithOffPeakStartVMOnConnect { + /** + * Specifies the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the + * hostpool during the off-peak phase.. + * + * @param offPeakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during + * the off-peak phase. + * @return the next definition stage. + */ + WithCreate withOffPeakStartVMOnConnect(SetStartVMOnConnect offPeakStartVMOnConnect); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakActionOnDisconnect. */ + interface WithOffPeakActionOnDisconnect { + /** + * Specifies the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the + * off-peak period.. + * + * @param offPeakActionOnDisconnect Action to be taken after a user disconnect during the off-peak period. + * @return the next definition stage. + */ + WithCreate withOffPeakActionOnDisconnect(SessionHandlingOperation offPeakActionOnDisconnect); + } + + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakMinutesToWaitOnDisconnect. + */ + interface WithOffPeakMinutesToWaitOnDisconnect { + /** + * Specifies the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing + * the desired session handling action when a user disconnects during the off-peak period.. + * + * @param offPeakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session + * handling action when a user disconnects during the off-peak period. + * @return the next definition stage. + */ + WithCreate withOffPeakMinutesToWaitOnDisconnect(Integer offPeakMinutesToWaitOnDisconnect); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakActionOnLogoff. */ + interface WithOffPeakActionOnLogoff { + /** + * Specifies the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak + * period.. + * + * @param offPeakActionOnLogoff Action to be taken after a logoff during the off-peak period. + * @return the next definition stage. + */ + WithCreate withOffPeakActionOnLogoff(SessionHandlingOperation offPeakActionOnLogoff); + } + + /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakMinutesToWaitOnLogoff. */ + interface WithOffPeakMinutesToWaitOnLogoff { + /** + * Specifies the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the + * desired session handling action when a user logs off during the off-peak period.. + * + * @param offPeakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session + * handling action when a user logs off during the off-peak period. + * @return the next definition stage. + */ + WithCreate withOffPeakMinutesToWaitOnLogoff(Integer offPeakMinutesToWaitOnLogoff); + } + } + + /** + * Begins update for the ScalingPlanPersonalSchedule resource. + * + * @return the stage of resource update. + */ + ScalingPlanPersonalSchedule.Update update(); + + /** The template for ScalingPlanPersonalSchedule update. */ + interface Update + extends UpdateStages.WithDaysOfWeek, + UpdateStages.WithRampUpStartTime, + UpdateStages.WithRampUpAutoStartHosts, + UpdateStages.WithRampUpStartVMOnConnect, + UpdateStages.WithRampUpActionOnDisconnect, + UpdateStages.WithRampUpMinutesToWaitOnDisconnect, + UpdateStages.WithRampUpActionOnLogoff, + UpdateStages.WithRampUpMinutesToWaitOnLogoff, + UpdateStages.WithPeakStartTime, + UpdateStages.WithPeakStartVMOnConnect, + UpdateStages.WithPeakActionOnDisconnect, + UpdateStages.WithPeakMinutesToWaitOnDisconnect, + UpdateStages.WithPeakActionOnLogoff, + UpdateStages.WithPeakMinutesToWaitOnLogoff, + UpdateStages.WithRampDownStartTime, + UpdateStages.WithRampDownStartVMOnConnect, + UpdateStages.WithRampDownActionOnDisconnect, + UpdateStages.WithRampDownMinutesToWaitOnDisconnect, + UpdateStages.WithRampDownActionOnLogoff, + UpdateStages.WithRampDownMinutesToWaitOnLogoff, + UpdateStages.WithOffPeakStartTime, + UpdateStages.WithOffPeakStartVMOnConnect, + UpdateStages.WithOffPeakActionOnDisconnect, + UpdateStages.WithOffPeakMinutesToWaitOnDisconnect, + UpdateStages.WithOffPeakActionOnLogoff, + UpdateStages.WithOffPeakMinutesToWaitOnLogoff { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ScalingPlanPersonalSchedule apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ScalingPlanPersonalSchedule apply(Context context); + } + + /** The ScalingPlanPersonalSchedule update stages. */ + interface UpdateStages { + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify daysOfWeek. */ + interface WithDaysOfWeek { + /** + * Specifies the daysOfWeek property: Set of days of the week on which this schedule is active.. + * + * @param daysOfWeek Set of days of the week on which this schedule is active. + * @return the next definition stage. + */ + Update withDaysOfWeek(List daysOfWeek); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpStartTime. */ + interface WithRampUpStartTime { + /** + * Specifies the rampUpStartTime property: Starting time for ramp up period.. + * + * @param rampUpStartTime Starting time for ramp up period. + * @return the next definition stage. + */ + Update withRampUpStartTime(Time rampUpStartTime); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpAutoStartHosts. */ + interface WithRampUpAutoStartHosts { + /** + * Specifies the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for + * personal vms in the hostpool.. + * + * @param rampUpAutoStartHosts The desired startup behavior during the ramp up period for personal vms in + * the hostpool. + * @return the next definition stage. + */ + Update withRampUpAutoStartHosts(StartupBehavior rampUpAutoStartHosts); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpStartVMOnConnect. */ + interface WithRampUpStartVMOnConnect { + /** + * Specifies the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the + * hostpool during the ramp up phase. If this is disabled, session hosts must be turned on using + * rampUpAutoStartHosts or by turning them on manually.. + * + * @param rampUpStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during + * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or + * by turning them on manually. + * @return the next definition stage. + */ + Update withRampUpStartVMOnConnect(SetStartVMOnConnect rampUpStartVMOnConnect); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpActionOnDisconnect. */ + interface WithRampUpActionOnDisconnect { + /** + * Specifies the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the + * ramp up period.. + * + * @param rampUpActionOnDisconnect Action to be taken after a user disconnect during the ramp up period. + * @return the next definition stage. + */ + Update withRampUpActionOnDisconnect(SessionHandlingOperation rampUpActionOnDisconnect); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpMinutesToWaitOnDisconnect. */ + interface WithRampUpMinutesToWaitOnDisconnect { + /** + * Specifies the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the + * desired session handling action when a user disconnects during the ramp up period.. + * + * @param rampUpMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session + * handling action when a user disconnects during the ramp up period. + * @return the next definition stage. + */ + Update withRampUpMinutesToWaitOnDisconnect(Integer rampUpMinutesToWaitOnDisconnect); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpActionOnLogoff. */ + interface WithRampUpActionOnLogoff { + /** + * Specifies the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up + * period.. + * + * @param rampUpActionOnLogoff Action to be taken after a logoff during the ramp up period. + * @return the next definition stage. + */ + Update withRampUpActionOnLogoff(SessionHandlingOperation rampUpActionOnLogoff); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpMinutesToWaitOnLogoff. */ + interface WithRampUpMinutesToWaitOnLogoff { + /** + * Specifies the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the + * desired session handling action when a user logs off during the ramp up period.. + * + * @param rampUpMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp up period. + * @return the next definition stage. + */ + Update withRampUpMinutesToWaitOnLogoff(Integer rampUpMinutesToWaitOnLogoff); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify peakStartTime. */ + interface WithPeakStartTime { + /** + * Specifies the peakStartTime property: Starting time for peak period.. + * + * @param peakStartTime Starting time for peak period. + * @return the next definition stage. + */ + Update withPeakStartTime(Time peakStartTime); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify peakStartVMOnConnect. */ + interface WithPeakStartVMOnConnect { + /** + * Specifies the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the + * hostpool during the peak phase.. + * + * @param peakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the + * peak phase. + * @return the next definition stage. + */ + Update withPeakStartVMOnConnect(SetStartVMOnConnect peakStartVMOnConnect); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify peakActionOnDisconnect. */ + interface WithPeakActionOnDisconnect { + /** + * Specifies the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak + * period.. + * + * @param peakActionOnDisconnect Action to be taken after a user disconnect during the peak period. + * @return the next definition stage. + */ + Update withPeakActionOnDisconnect(SessionHandlingOperation peakActionOnDisconnect); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify peakMinutesToWaitOnDisconnect. */ + interface WithPeakMinutesToWaitOnDisconnect { + /** + * Specifies the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the + * desired session handling action when a user disconnects during the peak period.. + * + * @param peakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session + * handling action when a user disconnects during the peak period. + * @return the next definition stage. + */ + Update withPeakMinutesToWaitOnDisconnect(Integer peakMinutesToWaitOnDisconnect); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify peakActionOnLogoff. */ + interface WithPeakActionOnLogoff { + /** + * Specifies the peakActionOnLogoff property: Action to be taken after a logoff during the peak period.. + * + * @param peakActionOnLogoff Action to be taken after a logoff during the peak period. + * @return the next definition stage. + */ + Update withPeakActionOnLogoff(SessionHandlingOperation peakActionOnLogoff); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify peakMinutesToWaitOnLogoff. */ + interface WithPeakMinutesToWaitOnLogoff { + /** + * Specifies the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the + * desired session handling action when a user logs off during the peak period.. + * + * @param peakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session + * handling action when a user logs off during the peak period. + * @return the next definition stage. + */ + Update withPeakMinutesToWaitOnLogoff(Integer peakMinutesToWaitOnLogoff); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownStartTime. */ + interface WithRampDownStartTime { + /** + * Specifies the rampDownStartTime property: Starting time for ramp down period.. + * + * @param rampDownStartTime Starting time for ramp down period. + * @return the next definition stage. + */ + Update withRampDownStartTime(Time rampDownStartTime); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownStartVMOnConnect. */ + interface WithRampDownStartVMOnConnect { + /** + * Specifies the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the + * hostpool during the ramp down phase.. + * + * @param rampDownStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during + * the ramp down phase. + * @return the next definition stage. + */ + Update withRampDownStartVMOnConnect(SetStartVMOnConnect rampDownStartVMOnConnect); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownActionOnDisconnect. */ + interface WithRampDownActionOnDisconnect { + /** + * Specifies the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the + * ramp down period.. + * + * @param rampDownActionOnDisconnect Action to be taken after a user disconnect during the ramp down period. + * @return the next definition stage. + */ + Update withRampDownActionOnDisconnect(SessionHandlingOperation rampDownActionOnDisconnect); + } + + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownMinutesToWaitOnDisconnect. + */ + interface WithRampDownMinutesToWaitOnDisconnect { + /** + * Specifies the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing + * the desired session handling action when a user disconnects during the ramp down period.. + * + * @param rampDownMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp down period. + * @return the next definition stage. + */ + Update withRampDownMinutesToWaitOnDisconnect(Integer rampDownMinutesToWaitOnDisconnect); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownActionOnLogoff. */ + interface WithRampDownActionOnLogoff { + /** + * Specifies the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down + * period.. + * + * @param rampDownActionOnLogoff Action to be taken after a logoff during the ramp down period. + * @return the next definition stage. + */ + Update withRampDownActionOnLogoff(SessionHandlingOperation rampDownActionOnLogoff); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownMinutesToWaitOnLogoff. */ + interface WithRampDownMinutesToWaitOnLogoff { + /** + * Specifies the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the + * desired session handling action when a user logs off during the ramp down period.. + * + * @param rampDownMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp down period. + * @return the next definition stage. + */ + Update withRampDownMinutesToWaitOnLogoff(Integer rampDownMinutesToWaitOnLogoff); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakStartTime. */ + interface WithOffPeakStartTime { + /** + * Specifies the offPeakStartTime property: Starting time for off-peak period.. + * + * @param offPeakStartTime Starting time for off-peak period. + * @return the next definition stage. + */ + Update withOffPeakStartTime(Time offPeakStartTime); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakStartVMOnConnect. */ + interface WithOffPeakStartVMOnConnect { + /** + * Specifies the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the + * hostpool during the off-peak phase.. + * + * @param offPeakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during + * the off-peak phase. + * @return the next definition stage. + */ + Update withOffPeakStartVMOnConnect(SetStartVMOnConnect offPeakStartVMOnConnect); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakActionOnDisconnect. */ + interface WithOffPeakActionOnDisconnect { + /** + * Specifies the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the + * off-peak period.. + * + * @param offPeakActionOnDisconnect Action to be taken after a user disconnect during the off-peak period. + * @return the next definition stage. + */ + Update withOffPeakActionOnDisconnect(SessionHandlingOperation offPeakActionOnDisconnect); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakMinutesToWaitOnDisconnect. */ + interface WithOffPeakMinutesToWaitOnDisconnect { + /** + * Specifies the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing + * the desired session handling action when a user disconnects during the off-peak period.. + * + * @param offPeakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session + * handling action when a user disconnects during the off-peak period. + * @return the next definition stage. + */ + Update withOffPeakMinutesToWaitOnDisconnect(Integer offPeakMinutesToWaitOnDisconnect); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakActionOnLogoff. */ + interface WithOffPeakActionOnLogoff { + /** + * Specifies the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak + * period.. + * + * @param offPeakActionOnLogoff Action to be taken after a logoff during the off-peak period. + * @return the next definition stage. + */ + Update withOffPeakActionOnLogoff(SessionHandlingOperation offPeakActionOnLogoff); + } + + /** The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakMinutesToWaitOnLogoff. */ + interface WithOffPeakMinutesToWaitOnLogoff { + /** + * Specifies the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the + * desired session handling action when a user logs off during the off-peak period.. + * + * @param offPeakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session + * handling action when a user logs off during the off-peak period. + * @return the next definition stage. + */ + Update withOffPeakMinutesToWaitOnLogoff(Integer offPeakMinutesToWaitOnLogoff); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ScalingPlanPersonalSchedule refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ScalingPlanPersonalSchedule refresh(Context context); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalScheduleList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalScheduleList.java new file mode 100644 index 000000000000..80e3f211b2c4 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalScheduleList.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * ScalingPlanPersonalScheduleList + * + *

List of ScalingPlanPersonalSchedule definitions. + */ +@Fluent +public final class ScalingPlanPersonalScheduleList { + /* + * List of ScalingPlanPersonalSchedule definitions. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next page of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of ScalingPlanPersonalScheduleList class. */ + public ScalingPlanPersonalScheduleList() { + } + + /** + * Get the value property: List of ScalingPlanPersonalSchedule definitions. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of ScalingPlanPersonalSchedule definitions. + * + * @param value the value value to set. + * @return the ScalingPlanPersonalScheduleList object itself. + */ + public ScalingPlanPersonalScheduleList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedulePatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedulePatch.java new file mode 100644 index 000000000000..1cac9608a949 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedulePatch.java @@ -0,0 +1,682 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** ScalingPlanPersonalSchedule properties that can be patched. */ +@Fluent +public final class ScalingPlanPersonalSchedulePatch { + /* + * Detailed properties for ScalingPlanPersonalSchedule + */ + @JsonProperty(value = "properties") + private ScalingPlanPersonalScheduleProperties innerProperties; + + /** Creates an instance of ScalingPlanPersonalSchedulePatch class. */ + public ScalingPlanPersonalSchedulePatch() { + } + + /** + * Get the innerProperties property: Detailed properties for ScalingPlanPersonalSchedule. + * + * @return the innerProperties value. + */ + private ScalingPlanPersonalScheduleProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the daysOfWeek property: Set of days of the week on which this schedule is active. + * + * @return the daysOfWeek value. + */ + public List daysOfWeek() { + return this.innerProperties() == null ? null : this.innerProperties().daysOfWeek(); + } + + /** + * Set the daysOfWeek property: Set of days of the week on which this schedule is active. + * + * @param daysOfWeek the daysOfWeek value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withDaysOfWeek(List daysOfWeek) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withDaysOfWeek(daysOfWeek); + return this; + } + + /** + * Get the rampUpStartTime property: Starting time for ramp up period. + * + * @return the rampUpStartTime value. + */ + public Time rampUpStartTime() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpStartTime(); + } + + /** + * Set the rampUpStartTime property: Starting time for ramp up period. + * + * @param rampUpStartTime the rampUpStartTime value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withRampUpStartTime(Time rampUpStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampUpStartTime(rampUpStartTime); + return this; + } + + /** + * Get the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for personal vms in + * the hostpool. + * + * @return the rampUpAutoStartHosts value. + */ + public StartupBehavior rampUpAutoStartHosts() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpAutoStartHosts(); + } + + /** + * Set the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for personal vms in + * the hostpool. + * + * @param rampUpAutoStartHosts the rampUpAutoStartHosts value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withRampUpAutoStartHosts(StartupBehavior rampUpAutoStartHosts) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampUpAutoStartHosts(rampUpAutoStartHosts); + return this; + } + + /** + * Get the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during + * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning + * them on manually. + * + * @return the rampUpStartVMOnConnect value. + */ + public SetStartVMOnConnect rampUpStartVMOnConnect() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpStartVMOnConnect(); + } + + /** + * Set the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during + * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning + * them on manually. + * + * @param rampUpStartVMOnConnect the rampUpStartVMOnConnect value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withRampUpStartVMOnConnect(SetStartVMOnConnect rampUpStartVMOnConnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampUpStartVMOnConnect(rampUpStartVMOnConnect); + return this; + } + + /** + * Get the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the ramp up period. + * + * @return the rampUpActionOnDisconnect value. + */ + public SessionHandlingOperation rampUpActionOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpActionOnDisconnect(); + } + + /** + * Set the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the ramp up period. + * + * @param rampUpActionOnDisconnect the rampUpActionOnDisconnect value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withRampUpActionOnDisconnect( + SessionHandlingOperation rampUpActionOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampUpActionOnDisconnect(rampUpActionOnDisconnect); + return this; + } + + /** + * Get the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp up period. + * + * @return the rampUpMinutesToWaitOnDisconnect value. + */ + public Integer rampUpMinutesToWaitOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpMinutesToWaitOnDisconnect(); + } + + /** + * Set the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp up period. + * + * @param rampUpMinutesToWaitOnDisconnect the rampUpMinutesToWaitOnDisconnect value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withRampUpMinutesToWaitOnDisconnect( + Integer rampUpMinutesToWaitOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampUpMinutesToWaitOnDisconnect(rampUpMinutesToWaitOnDisconnect); + return this; + } + + /** + * Get the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up period. + * + * @return the rampUpActionOnLogoff value. + */ + public SessionHandlingOperation rampUpActionOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpActionOnLogoff(); + } + + /** + * Set the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up period. + * + * @param rampUpActionOnLogoff the rampUpActionOnLogoff value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withRampUpActionOnLogoff(SessionHandlingOperation rampUpActionOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampUpActionOnLogoff(rampUpActionOnLogoff); + return this; + } + + /** + * Get the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp up period. + * + * @return the rampUpMinutesToWaitOnLogoff value. + */ + public Integer rampUpMinutesToWaitOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpMinutesToWaitOnLogoff(); + } + + /** + * Set the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp up period. + * + * @param rampUpMinutesToWaitOnLogoff the rampUpMinutesToWaitOnLogoff value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withRampUpMinutesToWaitOnLogoff(Integer rampUpMinutesToWaitOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampUpMinutesToWaitOnLogoff(rampUpMinutesToWaitOnLogoff); + return this; + } + + /** + * Get the peakStartTime property: Starting time for peak period. + * + * @return the peakStartTime value. + */ + public Time peakStartTime() { + return this.innerProperties() == null ? null : this.innerProperties().peakStartTime(); + } + + /** + * Set the peakStartTime property: Starting time for peak period. + * + * @param peakStartTime the peakStartTime value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withPeakStartTime(Time peakStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withPeakStartTime(peakStartTime); + return this; + } + + /** + * Get the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during + * the peak phase. + * + * @return the peakStartVMOnConnect value. + */ + public SetStartVMOnConnect peakStartVMOnConnect() { + return this.innerProperties() == null ? null : this.innerProperties().peakStartVMOnConnect(); + } + + /** + * Set the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during + * the peak phase. + * + * @param peakStartVMOnConnect the peakStartVMOnConnect value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withPeakStartVMOnConnect(SetStartVMOnConnect peakStartVMOnConnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withPeakStartVMOnConnect(peakStartVMOnConnect); + return this; + } + + /** + * Get the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak period. + * + * @return the peakActionOnDisconnect value. + */ + public SessionHandlingOperation peakActionOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().peakActionOnDisconnect(); + } + + /** + * Set the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak period. + * + * @param peakActionOnDisconnect the peakActionOnDisconnect value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withPeakActionOnDisconnect( + SessionHandlingOperation peakActionOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withPeakActionOnDisconnect(peakActionOnDisconnect); + return this; + } + + /** + * Get the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired session + * handling action when a user disconnects during the peak period. + * + * @return the peakMinutesToWaitOnDisconnect value. + */ + public Integer peakMinutesToWaitOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().peakMinutesToWaitOnDisconnect(); + } + + /** + * Set the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired session + * handling action when a user disconnects during the peak period. + * + * @param peakMinutesToWaitOnDisconnect the peakMinutesToWaitOnDisconnect value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withPeakMinutesToWaitOnDisconnect(Integer peakMinutesToWaitOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withPeakMinutesToWaitOnDisconnect(peakMinutesToWaitOnDisconnect); + return this; + } + + /** + * Get the peakActionOnLogoff property: Action to be taken after a logoff during the peak period. + * + * @return the peakActionOnLogoff value. + */ + public SessionHandlingOperation peakActionOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().peakActionOnLogoff(); + } + + /** + * Set the peakActionOnLogoff property: Action to be taken after a logoff during the peak period. + * + * @param peakActionOnLogoff the peakActionOnLogoff value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withPeakActionOnLogoff(SessionHandlingOperation peakActionOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withPeakActionOnLogoff(peakActionOnLogoff); + return this; + } + + /** + * Get the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the peak period. + * + * @return the peakMinutesToWaitOnLogoff value. + */ + public Integer peakMinutesToWaitOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().peakMinutesToWaitOnLogoff(); + } + + /** + * Set the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the peak period. + * + * @param peakMinutesToWaitOnLogoff the peakMinutesToWaitOnLogoff value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withPeakMinutesToWaitOnLogoff(Integer peakMinutesToWaitOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withPeakMinutesToWaitOnLogoff(peakMinutesToWaitOnLogoff); + return this; + } + + /** + * Get the rampDownStartTime property: Starting time for ramp down period. + * + * @return the rampDownStartTime value. + */ + public Time rampDownStartTime() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownStartTime(); + } + + /** + * Set the rampDownStartTime property: Starting time for ramp down period. + * + * @param rampDownStartTime the rampDownStartTime value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withRampDownStartTime(Time rampDownStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampDownStartTime(rampDownStartTime); + return this; + } + + /** + * Get the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the ramp down phase. + * + * @return the rampDownStartVMOnConnect value. + */ + public SetStartVMOnConnect rampDownStartVMOnConnect() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownStartVMOnConnect(); + } + + /** + * Set the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the ramp down phase. + * + * @param rampDownStartVMOnConnect the rampDownStartVMOnConnect value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withRampDownStartVMOnConnect(SetStartVMOnConnect rampDownStartVMOnConnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampDownStartVMOnConnect(rampDownStartVMOnConnect); + return this; + } + + /** + * Get the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the ramp down + * period. + * + * @return the rampDownActionOnDisconnect value. + */ + public SessionHandlingOperation rampDownActionOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownActionOnDisconnect(); + } + + /** + * Set the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the ramp down + * period. + * + * @param rampDownActionOnDisconnect the rampDownActionOnDisconnect value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withRampDownActionOnDisconnect( + SessionHandlingOperation rampDownActionOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampDownActionOnDisconnect(rampDownActionOnDisconnect); + return this; + } + + /** + * Get the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp down period. + * + * @return the rampDownMinutesToWaitOnDisconnect value. + */ + public Integer rampDownMinutesToWaitOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownMinutesToWaitOnDisconnect(); + } + + /** + * Set the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the ramp down period. + * + * @param rampDownMinutesToWaitOnDisconnect the rampDownMinutesToWaitOnDisconnect value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withRampDownMinutesToWaitOnDisconnect( + Integer rampDownMinutesToWaitOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampDownMinutesToWaitOnDisconnect(rampDownMinutesToWaitOnDisconnect); + return this; + } + + /** + * Get the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down period. + * + * @return the rampDownActionOnLogoff value. + */ + public SessionHandlingOperation rampDownActionOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownActionOnLogoff(); + } + + /** + * Set the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down period. + * + * @param rampDownActionOnLogoff the rampDownActionOnLogoff value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withRampDownActionOnLogoff( + SessionHandlingOperation rampDownActionOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampDownActionOnLogoff(rampDownActionOnLogoff); + return this; + } + + /** + * Get the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp down period. + * + * @return the rampDownMinutesToWaitOnLogoff value. + */ + public Integer rampDownMinutesToWaitOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownMinutesToWaitOnLogoff(); + } + + /** + * Set the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the ramp down period. + * + * @param rampDownMinutesToWaitOnLogoff the rampDownMinutesToWaitOnLogoff value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withRampDownMinutesToWaitOnLogoff(Integer rampDownMinutesToWaitOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withRampDownMinutesToWaitOnLogoff(rampDownMinutesToWaitOnLogoff); + return this; + } + + /** + * Get the offPeakStartTime property: Starting time for off-peak period. + * + * @return the offPeakStartTime value. + */ + public Time offPeakStartTime() { + return this.innerProperties() == null ? null : this.innerProperties().offPeakStartTime(); + } + + /** + * Set the offPeakStartTime property: Starting time for off-peak period. + * + * @param offPeakStartTime the offPeakStartTime value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withOffPeakStartTime(Time offPeakStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withOffPeakStartTime(offPeakStartTime); + return this; + } + + /** + * Get the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the off-peak phase. + * + * @return the offPeakStartVMOnConnect value. + */ + public SetStartVMOnConnect offPeakStartVMOnConnect() { + return this.innerProperties() == null ? null : this.innerProperties().offPeakStartVMOnConnect(); + } + + /** + * Set the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool + * during the off-peak phase. + * + * @param offPeakStartVMOnConnect the offPeakStartVMOnConnect value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withOffPeakStartVMOnConnect(SetStartVMOnConnect offPeakStartVMOnConnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withOffPeakStartVMOnConnect(offPeakStartVMOnConnect); + return this; + } + + /** + * Get the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the off-peak + * period. + * + * @return the offPeakActionOnDisconnect value. + */ + public SessionHandlingOperation offPeakActionOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().offPeakActionOnDisconnect(); + } + + /** + * Set the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the off-peak + * period. + * + * @param offPeakActionOnDisconnect the offPeakActionOnDisconnect value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withOffPeakActionOnDisconnect( + SessionHandlingOperation offPeakActionOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withOffPeakActionOnDisconnect(offPeakActionOnDisconnect); + return this; + } + + /** + * Get the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the off-peak period. + * + * @return the offPeakMinutesToWaitOnDisconnect value. + */ + public Integer offPeakMinutesToWaitOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().offPeakMinutesToWaitOnDisconnect(); + } + + /** + * Set the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired + * session handling action when a user disconnects during the off-peak period. + * + * @param offPeakMinutesToWaitOnDisconnect the offPeakMinutesToWaitOnDisconnect value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withOffPeakMinutesToWaitOnDisconnect( + Integer offPeakMinutesToWaitOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withOffPeakMinutesToWaitOnDisconnect(offPeakMinutesToWaitOnDisconnect); + return this; + } + + /** + * Get the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak period. + * + * @return the offPeakActionOnLogoff value. + */ + public SessionHandlingOperation offPeakActionOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().offPeakActionOnLogoff(); + } + + /** + * Set the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak period. + * + * @param offPeakActionOnLogoff the offPeakActionOnLogoff value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withOffPeakActionOnLogoff(SessionHandlingOperation offPeakActionOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withOffPeakActionOnLogoff(offPeakActionOnLogoff); + return this; + } + + /** + * Get the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the off-peak period. + * + * @return the offPeakMinutesToWaitOnLogoff value. + */ + public Integer offPeakMinutesToWaitOnLogoff() { + return this.innerProperties() == null ? null : this.innerProperties().offPeakMinutesToWaitOnLogoff(); + } + + /** + * Set the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session + * handling action when a user logs off during the off-peak period. + * + * @param offPeakMinutesToWaitOnLogoff the offPeakMinutesToWaitOnLogoff value to set. + * @return the ScalingPlanPersonalSchedulePatch object itself. + */ + public ScalingPlanPersonalSchedulePatch withOffPeakMinutesToWaitOnLogoff(Integer offPeakMinutesToWaitOnLogoff) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPersonalScheduleProperties(); + } + this.innerProperties().withOffPeakMinutesToWaitOnLogoff(offPeakMinutesToWaitOnLogoff); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedules.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedules.java new file mode 100644 index 000000000000..5c8b0790049a --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedules.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of ScalingPlanPersonalSchedules. */ +public interface ScalingPlanPersonalSchedules { + /** + * Get a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPersonalSchedule along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context); + + /** + * Get a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPersonalSchedule. + */ + ScalingPlanPersonalSchedule get(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * Remove a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context); + + /** + * Remove a ScalingPlanPersonalSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * List ScalingPlanPersonalSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String scalingPlanName); + + /** + * List ScalingPlanPersonalSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String scalingPlanName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); + + /** + * Get a ScalingPlanPersonalSchedule. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPersonalSchedule along with {@link Response}. + */ + ScalingPlanPersonalSchedule getById(String id); + + /** + * Get a ScalingPlanPersonalSchedule. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPersonalSchedule along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Remove a ScalingPlanPersonalSchedule. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Remove a ScalingPlanPersonalSchedule. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ScalingPlanPersonalSchedule resource. + * + * @param name resource name. + * @return the first stage of the new ScalingPlanPersonalSchedule definition. + */ + ScalingPlanPersonalSchedule.DefinitionStages.Blank define(String name); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedule.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedule.java index 9501a7780c9a..9217dd0d945f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedule.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedule.java @@ -177,11 +177,13 @@ public interface ScalingPlanPooledSchedule { interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The ScalingPlanPooledSchedule definition stages. */ interface DefinitionStages { /** The first stage of the ScalingPlanPooledSchedule definition. */ interface Blank extends WithParentResource { } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -193,6 +195,7 @@ interface WithParentResource { */ WithCreate withExistingScalingPlan(String resourceGroupName, String scalingPlanName); } + /** * The stage of the ScalingPlanPooledSchedule definition which contains all the minimum required properties for * the resource to be created, but also allows for any other optional properties to be specified. @@ -230,6 +233,7 @@ interface WithCreate */ ScalingPlanPooledSchedule create(Context context); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify daysOfWeek. */ interface WithDaysOfWeek { /** @@ -240,6 +244,7 @@ interface WithDaysOfWeek { */ WithCreate withDaysOfWeek(List daysOfWeek); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampUpStartTime. */ interface WithRampUpStartTime { /** @@ -250,6 +255,7 @@ interface WithRampUpStartTime { */ WithCreate withRampUpStartTime(Time rampUpStartTime); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampUpLoadBalancingAlgorithm. */ interface WithRampUpLoadBalancingAlgorithm { /** @@ -260,6 +266,7 @@ interface WithRampUpLoadBalancingAlgorithm { */ WithCreate withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampUpMinimumHostsPct. */ interface WithRampUpMinimumHostsPct { /** @@ -270,6 +277,7 @@ interface WithRampUpMinimumHostsPct { */ WithCreate withRampUpMinimumHostsPct(Integer rampUpMinimumHostsPct); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampUpCapacityThresholdPct. */ interface WithRampUpCapacityThresholdPct { /** @@ -280,6 +288,7 @@ interface WithRampUpCapacityThresholdPct { */ WithCreate withRampUpCapacityThresholdPct(Integer rampUpCapacityThresholdPct); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify peakStartTime. */ interface WithPeakStartTime { /** @@ -290,6 +299,7 @@ interface WithPeakStartTime { */ WithCreate withPeakStartTime(Time peakStartTime); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify peakLoadBalancingAlgorithm. */ interface WithPeakLoadBalancingAlgorithm { /** @@ -300,6 +310,7 @@ interface WithPeakLoadBalancingAlgorithm { */ WithCreate withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownStartTime. */ interface WithRampDownStartTime { /** @@ -310,6 +321,7 @@ interface WithRampDownStartTime { */ WithCreate withRampDownStartTime(Time rampDownStartTime); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownLoadBalancingAlgorithm. */ interface WithRampDownLoadBalancingAlgorithm { /** @@ -321,6 +333,7 @@ interface WithRampDownLoadBalancingAlgorithm { WithCreate withRampDownLoadBalancingAlgorithm( SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownMinimumHostsPct. */ interface WithRampDownMinimumHostsPct { /** @@ -331,6 +344,7 @@ interface WithRampDownMinimumHostsPct { */ WithCreate withRampDownMinimumHostsPct(Integer rampDownMinimumHostsPct); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownCapacityThresholdPct. */ interface WithRampDownCapacityThresholdPct { /** @@ -341,6 +355,7 @@ interface WithRampDownCapacityThresholdPct { */ WithCreate withRampDownCapacityThresholdPct(Integer rampDownCapacityThresholdPct); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownForceLogoffUsers. */ interface WithRampDownForceLogoffUsers { /** @@ -351,6 +366,7 @@ interface WithRampDownForceLogoffUsers { */ WithCreate withRampDownForceLogoffUsers(Boolean rampDownForceLogoffUsers); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownStopHostsWhen. */ interface WithRampDownStopHostsWhen { /** @@ -361,6 +377,7 @@ interface WithRampDownStopHostsWhen { */ WithCreate withRampDownStopHostsWhen(StopHostsWhen rampDownStopHostsWhen); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownWaitTimeMinutes. */ interface WithRampDownWaitTimeMinutes { /** @@ -372,6 +389,7 @@ interface WithRampDownWaitTimeMinutes { */ WithCreate withRampDownWaitTimeMinutes(Integer rampDownWaitTimeMinutes); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownNotificationMessage. */ interface WithRampDownNotificationMessage { /** @@ -383,6 +401,7 @@ interface WithRampDownNotificationMessage { */ WithCreate withRampDownNotificationMessage(String rampDownNotificationMessage); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify offPeakStartTime. */ interface WithOffPeakStartTime { /** @@ -393,6 +412,7 @@ interface WithOffPeakStartTime { */ WithCreate withOffPeakStartTime(Time offPeakStartTime); } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify offPeakLoadBalancingAlgorithm. */ interface WithOffPeakLoadBalancingAlgorithm { /** @@ -405,6 +425,7 @@ WithCreate withOffPeakLoadBalancingAlgorithm( SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm); } } + /** * Begins update for the ScalingPlanPooledSchedule resource. * @@ -446,6 +467,7 @@ interface Update */ ScalingPlanPooledSchedule apply(Context context); } + /** The ScalingPlanPooledSchedule update stages. */ interface UpdateStages { /** The stage of the ScalingPlanPooledSchedule update allowing to specify daysOfWeek. */ @@ -458,6 +480,7 @@ interface WithDaysOfWeek { */ Update withDaysOfWeek(List daysOfWeek); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampUpStartTime. */ interface WithRampUpStartTime { /** @@ -468,6 +491,7 @@ interface WithRampUpStartTime { */ Update withRampUpStartTime(Time rampUpStartTime); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampUpLoadBalancingAlgorithm. */ interface WithRampUpLoadBalancingAlgorithm { /** @@ -478,6 +502,7 @@ interface WithRampUpLoadBalancingAlgorithm { */ Update withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampUpMinimumHostsPct. */ interface WithRampUpMinimumHostsPct { /** @@ -488,6 +513,7 @@ interface WithRampUpMinimumHostsPct { */ Update withRampUpMinimumHostsPct(Integer rampUpMinimumHostsPct); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampUpCapacityThresholdPct. */ interface WithRampUpCapacityThresholdPct { /** @@ -498,6 +524,7 @@ interface WithRampUpCapacityThresholdPct { */ Update withRampUpCapacityThresholdPct(Integer rampUpCapacityThresholdPct); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify peakStartTime. */ interface WithPeakStartTime { /** @@ -508,6 +535,7 @@ interface WithPeakStartTime { */ Update withPeakStartTime(Time peakStartTime); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify peakLoadBalancingAlgorithm. */ interface WithPeakLoadBalancingAlgorithm { /** @@ -518,6 +546,7 @@ interface WithPeakLoadBalancingAlgorithm { */ Update withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampDownStartTime. */ interface WithRampDownStartTime { /** @@ -528,6 +557,7 @@ interface WithRampDownStartTime { */ Update withRampDownStartTime(Time rampDownStartTime); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampDownLoadBalancingAlgorithm. */ interface WithRampDownLoadBalancingAlgorithm { /** @@ -538,6 +568,7 @@ interface WithRampDownLoadBalancingAlgorithm { */ Update withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampDownMinimumHostsPct. */ interface WithRampDownMinimumHostsPct { /** @@ -548,6 +579,7 @@ interface WithRampDownMinimumHostsPct { */ Update withRampDownMinimumHostsPct(Integer rampDownMinimumHostsPct); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampDownCapacityThresholdPct. */ interface WithRampDownCapacityThresholdPct { /** @@ -558,6 +590,7 @@ interface WithRampDownCapacityThresholdPct { */ Update withRampDownCapacityThresholdPct(Integer rampDownCapacityThresholdPct); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampDownForceLogoffUsers. */ interface WithRampDownForceLogoffUsers { /** @@ -568,6 +601,7 @@ interface WithRampDownForceLogoffUsers { */ Update withRampDownForceLogoffUsers(Boolean rampDownForceLogoffUsers); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampDownStopHostsWhen. */ interface WithRampDownStopHostsWhen { /** @@ -578,6 +612,7 @@ interface WithRampDownStopHostsWhen { */ Update withRampDownStopHostsWhen(StopHostsWhen rampDownStopHostsWhen); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampDownWaitTimeMinutes. */ interface WithRampDownWaitTimeMinutes { /** @@ -589,6 +624,7 @@ interface WithRampDownWaitTimeMinutes { */ Update withRampDownWaitTimeMinutes(Integer rampDownWaitTimeMinutes); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampDownNotificationMessage. */ interface WithRampDownNotificationMessage { /** @@ -600,6 +636,7 @@ interface WithRampDownNotificationMessage { */ Update withRampDownNotificationMessage(String rampDownNotificationMessage); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify offPeakStartTime. */ interface WithOffPeakStartTime { /** @@ -610,6 +647,7 @@ interface WithOffPeakStartTime { */ Update withOffPeakStartTime(Time offPeakStartTime); } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify offPeakLoadBalancingAlgorithm. */ interface WithOffPeakLoadBalancingAlgorithm { /** @@ -621,6 +659,7 @@ interface WithOffPeakLoadBalancingAlgorithm { Update withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHandlingOperation.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHandlingOperation.java new file mode 100644 index 000000000000..17002258a15b --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHandlingOperation.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Action to be taken after a user disconnect during the ramp up period. */ +public final class SessionHandlingOperation extends ExpandableStringEnum { + /** Static value None for SessionHandlingOperation. */ + public static final SessionHandlingOperation NONE = fromString("None"); + + /** Static value Deallocate for SessionHandlingOperation. */ + public static final SessionHandlingOperation DEALLOCATE = fromString("Deallocate"); + + /** Static value Hibernate for SessionHandlingOperation. */ + public static final SessionHandlingOperation HIBERNATE = fromString("Hibernate"); + + /** + * Creates a new instance of SessionHandlingOperation value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SessionHandlingOperation() { + } + + /** + * Creates or finds a SessionHandlingOperation from its string representation. + * + * @param name a name to look for. + * @return the corresponding SessionHandlingOperation. + */ + @JsonCreator + public static SessionHandlingOperation fromString(String name) { + return fromString(name, SessionHandlingOperation.class); + } + + /** + * Gets known SessionHandlingOperation values. + * + * @return known SessionHandlingOperation values. + */ + public static Collection values() { + return values(SessionHandlingOperation.class); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SetStartVMOnConnect.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SetStartVMOnConnect.java new file mode 100644 index 000000000000..fc399b48546e --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SetStartVMOnConnect.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The desired configuration of Start VM On Connect for the hostpool during the ramp up phase. If this is disabled, + * session hosts must be turned on using rampUpAutoStartHosts or by turning them on manually. + */ +public final class SetStartVMOnConnect extends ExpandableStringEnum { + /** Static value Enable for SetStartVMOnConnect. */ + public static final SetStartVMOnConnect ENABLE = fromString("Enable"); + + /** Static value Disable for SetStartVMOnConnect. */ + public static final SetStartVMOnConnect DISABLE = fromString("Disable"); + + /** + * Creates a new instance of SetStartVMOnConnect value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SetStartVMOnConnect() { + } + + /** + * Creates or finds a SetStartVMOnConnect from its string representation. + * + * @param name a name to look for. + * @return the corresponding SetStartVMOnConnect. + */ + @JsonCreator + public static SetStartVMOnConnect fromString(String name) { + return fromString(name, SetStartVMOnConnect.class); + } + + /** + * Gets known SetStartVMOnConnect values. + * + * @return known SetStartVMOnConnect values. + */ + public static Collection values() { + return values(SetStartVMOnConnect.class); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartupBehavior.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartupBehavior.java new file mode 100644 index 000000000000..a26cd2b0b57f --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartupBehavior.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The desired startup behavior during the ramp up period for personal vms in the hostpool. */ +public final class StartupBehavior extends ExpandableStringEnum { + /** Static value None for StartupBehavior. */ + public static final StartupBehavior NONE = fromString("None"); + + /** Static value WithAssignedUser for StartupBehavior. */ + public static final StartupBehavior WITH_ASSIGNED_USER = fromString("WithAssignedUser"); + + /** Static value All for StartupBehavior. */ + public static final StartupBehavior ALL = fromString("All"); + + /** + * Creates a new instance of StartupBehavior value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StartupBehavior() { + } + + /** + * Creates or finds a StartupBehavior from its string representation. + * + * @param name a name to look for. + * @return the corresponding StartupBehavior. + */ + @JsonCreator + public static StartupBehavior fromString(String name) { + return fromString(name, StartupBehavior.class); + } + + /** + * Gets known StartupBehavior values. + * + * @return known StartupBehavior values. + */ + public static Collection values() { + return values(StartupBehavior.class); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Workspace.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Workspace.java index c677cc2358ad..ed77248a8288 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Workspace.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Workspace.java @@ -139,6 +139,22 @@ public interface Workspace { */ Boolean cloudPcResource(); + /** + * Gets the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private + * networks, Disabled allows this resource to only be accessed via private endpoints. + * + * @return the publicNetworkAccess value. + */ + PublicNetworkAccess publicNetworkAccess(); + + /** + * Gets the privateEndpointConnections property: List of private endpoint connection associated with the specified + * resource. + * + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); + /** * Gets the region of the resource. * @@ -174,11 +190,13 @@ interface Definition DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } + /** The Workspace definition stages. */ interface DefinitionStages { /** The first stage of the Workspace definition. */ interface Blank extends WithLocation { } + /** The stage of the Workspace definition allowing to specify location. */ interface WithLocation { /** @@ -197,6 +215,7 @@ interface WithLocation { */ WithResourceGroup withRegion(String location); } + /** The stage of the Workspace definition allowing to specify parent resource. */ interface WithResourceGroup { /** @@ -207,6 +226,7 @@ interface WithResourceGroup { */ WithCreate withExistingResourceGroup(String resourceGroupName); } + /** * The stage of the Workspace definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. @@ -220,7 +240,8 @@ interface WithCreate DefinitionStages.WithPlan, DefinitionStages.WithDescription, DefinitionStages.WithFriendlyName, - DefinitionStages.WithApplicationGroupReferences { + DefinitionStages.WithApplicationGroupReferences, + DefinitionStages.WithPublicNetworkAccess { /** * Executes the create request. * @@ -236,6 +257,7 @@ interface WithCreate */ Workspace create(Context context); } + /** The stage of the Workspace definition allowing to specify tags. */ interface WithTags { /** @@ -246,6 +268,7 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the Workspace definition allowing to specify managedBy. */ interface WithManagedBy { /** @@ -261,6 +284,7 @@ interface WithManagedBy { */ WithCreate withManagedBy(String managedBy); } + /** The stage of the Workspace definition allowing to specify kind. */ interface WithKind { /** @@ -275,6 +299,7 @@ interface WithKind { */ WithCreate withKind(String kind); } + /** The stage of the Workspace definition allowing to specify identity. */ interface WithIdentity { /** @@ -285,6 +310,7 @@ interface WithIdentity { */ WithCreate withIdentity(ResourceModelWithAllowedPropertySetIdentity identity); } + /** The stage of the Workspace definition allowing to specify sku. */ interface WithSku { /** @@ -295,6 +321,7 @@ interface WithSku { */ WithCreate withSku(ResourceModelWithAllowedPropertySetSku sku); } + /** The stage of the Workspace definition allowing to specify plan. */ interface WithPlan { /** @@ -305,6 +332,7 @@ interface WithPlan { */ WithCreate withPlan(ResourceModelWithAllowedPropertySetPlan plan); } + /** The stage of the Workspace definition allowing to specify description. */ interface WithDescription { /** @@ -315,6 +343,7 @@ interface WithDescription { */ WithCreate withDescription(String description); } + /** The stage of the Workspace definition allowing to specify friendlyName. */ interface WithFriendlyName { /** @@ -325,6 +354,7 @@ interface WithFriendlyName { */ WithCreate withFriendlyName(String friendlyName); } + /** The stage of the Workspace definition allowing to specify applicationGroupReferences. */ interface WithApplicationGroupReferences { /** @@ -335,7 +365,21 @@ interface WithApplicationGroupReferences { */ WithCreate withApplicationGroupReferences(List applicationGroupReferences); } + + /** The stage of the Workspace definition allowing to specify publicNetworkAccess. */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: Enabled allows this resource to be accessed from both public + * and private networks, Disabled allows this resource to only be accessed via private endpoints. + * + * @param publicNetworkAccess Enabled allows this resource to be accessed from both public and private + * networks, Disabled allows this resource to only be accessed via private endpoints. + * @return the next definition stage. + */ + WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + } } + /** * Begins update for the Workspace resource. * @@ -348,7 +392,8 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithDescription, UpdateStages.WithFriendlyName, - UpdateStages.WithApplicationGroupReferences { + UpdateStages.WithApplicationGroupReferences, + UpdateStages.WithPublicNetworkAccess { /** * Executes the update request. * @@ -364,6 +409,7 @@ interface Update */ Workspace apply(Context context); } + /** The Workspace update stages. */ interface UpdateStages { /** The stage of the Workspace update allowing to specify tags. */ @@ -376,6 +422,7 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the Workspace update allowing to specify description. */ interface WithDescription { /** @@ -386,6 +433,7 @@ interface WithDescription { */ Update withDescription(String description); } + /** The stage of the Workspace update allowing to specify friendlyName. */ interface WithFriendlyName { /** @@ -396,6 +444,7 @@ interface WithFriendlyName { */ Update withFriendlyName(String friendlyName); } + /** The stage of the Workspace update allowing to specify applicationGroupReferences. */ interface WithApplicationGroupReferences { /** @@ -406,7 +455,20 @@ interface WithApplicationGroupReferences { */ Update withApplicationGroupReferences(List applicationGroupReferences); } + + /** The stage of the Workspace update allowing to specify publicNetworkAccess. */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: Enabled to allow this resource to be access from the public + * network. + * + * @param publicNetworkAccess Enabled to allow this resource to be access from the public network. + * @return the next definition stage. + */ + Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/WorkspacePatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/WorkspacePatch.java index d988b3eebbb7..a2c2849e2ee5 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/WorkspacePatch.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/WorkspacePatch.java @@ -129,6 +129,29 @@ public WorkspacePatch withApplicationGroupReferences(List applicationGro return this; } + /** + * Get the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the WorkspacePatch object itself. + */ + public WorkspacePatch withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePatchProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + /** * Validates the instance. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsCreateOrUpdateSamples.java index 7a36e5613a07..bb8172264487 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsCreateOrUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ApplicationGroups CreateOrUpdate. */ public final class ApplicationGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Create.json */ /** * Sample code: ApplicationGroup_Create. @@ -31,9 +31,11 @@ public static void applicationGroupCreate( .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") + .withShowInFeed(true) .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteSamples.java index 70c5ea381503..60108384f45c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ApplicationGroups Delete. */ public final class ApplicationGroupsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Delete.json */ /** * Sample code: ApplicationGroup_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java index 07e3b0dbf61f..bf74645cc6ac 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ApplicationGroups GetByResourceGroup. */ public final class ApplicationGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Get.json */ /** * Sample code: ApplicationGroup_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java index e2130b177ad2..f4860929fe98 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ApplicationGroups ListByResourceGroup. */ public final class ApplicationGroupsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_ListByResourceGroup.json */ /** * Sample code: ApplicationGroup_ListByResourceGroup. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java index 80bc5356968a..4be0ec5be229 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java @@ -7,7 +7,7 @@ /** Samples for ApplicationGroups List. */ public final class ApplicationGroupsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_ListBySubscription.json */ /** * Sample code: ApplicationGroup_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsUpdateSamples.java index f81396d63e0e..d947de84a414 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ApplicationGroups Update. */ public final class ApplicationGroupsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Update.json */ /** * Sample code: ApplicationGroups_Update. @@ -30,9 +30,11 @@ public static void applicationGroupsUpdate( .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") + .withShowInFeed(true) .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateSamples.java index d89fd6612123..9cb6306bac21 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Applications CreateOrUpdate. */ public final class ApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Create.json */ /** * Sample code: Application_Create. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteSamples.java index 61810f9ccfff..a08d501719e0 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Applications Delete. */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Delete.json */ /** * Sample code: Application_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java index 47a9dad93829..a5e9be9340d2 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Applications Get. */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Get.json */ /** * Sample code: Application_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java index dd402a3e014e..0acf2a3e579d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Applications List. */ public final class ApplicationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_List.json */ /** * Sample code: Applications_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsUpdateSamples.java index 1870cdd81d78..ad21688194c5 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for Applications Update. */ public final class ApplicationsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Update.json */ /** * Sample code: Application_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetSamples.java index 3082294bcfba..6ee3076ede97 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Desktops Get. */ public final class DesktopsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Desktop_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Get.json */ /** * Sample code: Desktop_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java index 228e4c898336..76dd322caec7 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Desktops List. */ public final class DesktopsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Desktop_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_List.json */ /** * Sample code: Desktop_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateSamples.java index a287f91e8aa3..fd3ce680eb4d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Desktops Update. */ public final class DesktopsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Desktop_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Update.json */ /** * Sample code: Desktop_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsCreateOrUpdateSamples.java index 27e47d22b18f..aebcc181e4f4 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsCreateOrUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsCreateOrUpdateSamples.java @@ -23,7 +23,7 @@ /** Samples for HostPools CreateOrUpdate. */ public final class HostPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Create.json */ /** * Sample code: HostPool_Create. @@ -68,6 +68,7 @@ public static void hostPoolCreate( .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteSamples.java index 2235f1729325..777aaa57fb5d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for HostPools Delete. */ public final class HostPoolsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Delete.json */ /** * Sample code: HostPool_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java index a74776e01265..8ab5ce0650e0 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for HostPools GetByResourceGroup. */ public final class HostPoolsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Get.json */ /** * Sample code: HostPool_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java index 291ea6f0d375..8f8a1916a901 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for HostPools ListByResourceGroup. */ public final class HostPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_ListByResourceGroup.json */ /** * Sample code: HostPool_ListByResourceGroup. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListSamples.java index 735e2ef67382..e4edb9ceea55 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListSamples.java @@ -7,7 +7,7 @@ /** Samples for HostPools List. */ public final class HostPoolsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_List.json */ /** * Sample code: HostPool_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java index 1de75748b4bd..516b1e4c3329 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java @@ -7,7 +7,7 @@ /** Samples for HostPools RetrieveRegistrationToken. */ public final class HostPoolsRetrieveRegistrationTokenSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPools_RetrieveRegistrationToken_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPools_RetrieveRegistrationToken_Post.json */ /** * Sample code: HostPools_RetrieveRegistrationToken_Post. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsUpdateSamples.java index 8faa0a5d1422..171045fcfb64 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsUpdateSamples.java @@ -22,7 +22,7 @@ /** Samples for HostPools Update. */ public final class HostPoolsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Update.json */ /** * Sample code: HostPool_Update. @@ -67,6 +67,7 @@ public static void hostPoolUpdate( .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandSamples.java index 1f1580af8167..08e32074dcc8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandSamples.java @@ -9,7 +9,7 @@ /** Samples for MsixImages Expand. */ public final class MsixImagesExpandSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixImage_Expand_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixImage_Expand_Post.json */ /** * Sample code: MsixImage_Expand. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateSamples.java index f27a689b3bc0..7eb05104702e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for MsixPackages CreateOrUpdate. */ public final class MsixPackagesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Create.json */ /** * Sample code: MSIXPackage_Create. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteSamples.java index 6740f8f1cda2..3535f5d6c93d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for MsixPackages Delete. */ public final class MsixPackagesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Delete.json */ /** * Sample code: MSIXPackage_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java index 2c51759c920c..d74c26d6d288 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for MsixPackages Get. */ public final class MsixPackagesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Get.json */ /** * Sample code: MSIXPackage_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java index fcdd0a2a98eb..f45e7e5ede6c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java @@ -7,7 +7,7 @@ /** Samples for MsixPackages List. */ public final class MsixPackagesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_List.json */ /** * Sample code: MSIXPackage_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesUpdateSamples.java index fa1146c8d460..671bd72e6eb4 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for MsixPackages Update. */ public final class MsixPackagesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Update.json */ /** * Sample code: MSIXPackage_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java index 6d10d184fe91..28b0226815cc 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/OperationDescription_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/OperationDescription_List.json */ /** * Sample code: OperationDescription_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolSamples.java new file mode 100644 index 000000000000..e32cfef70403 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** Samples for PrivateEndpointConnections DeleteByHostPool. */ +public final class PrivateEndpointConnectionsDeleteByHostPoolSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_DeleteByHostPool.json + */ + /** + * Sample code: PrivateEndpointConnection_DeleteByHostPool. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionDeleteByHostPool( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .deleteByHostPoolWithResponse( + "resourceGroup1", + "hostPool1", + "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceSamples.java new file mode 100644 index 000000000000..69f4b8e0ed9e --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** Samples for PrivateEndpointConnections DeleteByWorkspace. */ +public final class PrivateEndpointConnectionsDeleteByWorkspaceSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_DeleteByWorkspace.json + */ + /** + * Sample code: PrivateEndpointConnection_DeleteByWorkspace. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionDeleteByWorkspace( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .deleteByWorkspaceWithResponse( + "resourceGroup1", + "workspace1", + "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolSamples.java new file mode 100644 index 000000000000..e48da89af70a --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** Samples for PrivateEndpointConnections GetByHostPool. */ +public final class PrivateEndpointConnectionsGetByHostPoolSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByHostPool.json + */ + /** + * Sample code: PrivateEndpointConnection_GetByHostPool. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionGetByHostPool( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .getByHostPoolWithResponse( + "resourceGroup1", + "hostPool1", + "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceSamples.java new file mode 100644 index 000000000000..8f3e3d4ff540 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** Samples for PrivateEndpointConnections GetByWorkspace. */ +public final class PrivateEndpointConnectionsGetByWorkspaceSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByWorkspace.json + */ + /** + * Sample code: PrivateEndpointConnection_GetByWorkspace. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionGetByWorkspace( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .getByWorkspaceWithResponse( + "resourceGroup1", + "workspace1", + "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolSamples.java new file mode 100644 index 000000000000..58ed915c64e5 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** Samples for PrivateEndpointConnections ListByHostPool. */ +public final class PrivateEndpointConnectionsListByHostPoolSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_ListByHostPool.json + */ + /** + * Sample code: PrivateEndpointConnection_ListByHostPool. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionListByHostPool( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .listByHostPool("resourceGroup1", "hostPool1", null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceSamples.java new file mode 100644 index 000000000000..271e032f9c9a --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** Samples for PrivateEndpointConnections ListByWorkspace. */ +public final class PrivateEndpointConnectionsListByWorkspaceSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_ListByWorkspace.json + */ + /** + * Sample code: PrivateEndpointConnection_ListByWorkspace. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionListByWorkspace( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .listByWorkspace("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolSamples.java new file mode 100644 index 000000000000..309d8ccbcd6a --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; + +/** Samples for PrivateEndpointConnections UpdateByHostPool. */ +public final class PrivateEndpointConnectionsUpdateByHostPoolSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_UpdateByHostPool.json + */ + /** + * Sample code: PrivateEndpointConnection_UpdateByHostPool. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionUpdateByHostPool( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .updateByHostPoolWithResponse( + "resourceGroup1", + "hostPool1", + "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + new PrivateEndpointConnection() + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Approved by admin@consoto.com") + .withActionsRequired("None")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceSamples.java new file mode 100644 index 000000000000..7e351104dba2 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; + +/** Samples for PrivateEndpointConnections UpdateByWorkspace. */ +public final class PrivateEndpointConnectionsUpdateByWorkspaceSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_UpdateByWorkspace.json + */ + /** + * Sample code: PrivateEndpointConnection_UpdateByWorkspace. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateEndpointConnectionUpdateByWorkspace( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateEndpointConnections() + .updateByWorkspaceWithResponse( + "resourceGroup1", + "workspace1", + "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + new PrivateEndpointConnection() + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Approved by admin@consoto.com") + .withActionsRequired("None")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolSamples.java new file mode 100644 index 000000000000..b7d07c4ea030 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** Samples for PrivateLinkResources ListByHostPool. */ +public final class PrivateLinkResourcesListByHostPoolSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateLinkResources_ListByHostPool.json + */ + /** + * Sample code: PrivateLinkResources_ListByHostPool. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateLinkResourcesListByHostPool( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateLinkResources() + .listByHostPool("resourceGroup1", "hostPool1", null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceSamples.java new file mode 100644 index 000000000000..8dc18d338f9c --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** Samples for PrivateLinkResources ListByWorkspace. */ +public final class PrivateLinkResourcesListByWorkspaceSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateLinkResources_ListByWorkspace.json + */ + /** + * Sample code: PrivateLinkResources_ListByWorkspace. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void privateLinkResourcesListByWorkspace( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .privateLinkResources() + .listByWorkspace("resourceGroup1", "workspace1", null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesCreateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesCreateSamples.java new file mode 100644 index 000000000000..237dee12c609 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesCreateSamples.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; +import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import java.util.Arrays; + +/** Samples for ScalingPlanPersonalSchedules Create. */ +public final class ScalingPlanPersonalSchedulesCreateSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Create.json + */ + /** + * Sample code: ScalingPlanPersonalSchedules_Create. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPersonalSchedulesCreate( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPersonalSchedules() + .define("scalingPlanScheduleWeekdays1") + .withExistingScalingPlan("resourceGroup1", "scalingPlan1") + .withDaysOfWeek( + Arrays + .asList( + DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY)) + .withRampUpStartTime(new Time().withHour(6).withMinute(0)) + .withRampUpAutoStartHosts(StartupBehavior.ALL) + .withRampUpStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withRampUpActionOnDisconnect(SessionHandlingOperation.NONE) + .withRampUpMinutesToWaitOnDisconnect(10) + .withRampUpActionOnLogoff(SessionHandlingOperation.NONE) + .withRampUpMinutesToWaitOnLogoff(10) + .withPeakStartTime(new Time().withHour(8).withMinute(0)) + .withPeakStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withPeakActionOnDisconnect(SessionHandlingOperation.NONE) + .withPeakMinutesToWaitOnDisconnect(10) + .withPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withPeakMinutesToWaitOnLogoff(10) + .withRampDownStartTime(new Time().withHour(18).withMinute(0)) + .withRampDownStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withRampDownActionOnDisconnect(SessionHandlingOperation.NONE) + .withRampDownMinutesToWaitOnDisconnect(10) + .withRampDownActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withRampDownMinutesToWaitOnLogoff(10) + .withOffPeakStartTime(new Time().withHour(20).withMinute(0)) + .withOffPeakStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withOffPeakActionOnDisconnect(SessionHandlingOperation.NONE) + .withOffPeakMinutesToWaitOnDisconnect(10) + .withOffPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withOffPeakMinutesToWaitOnLogoff(10) + .create(); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteSamples.java new file mode 100644 index 000000000000..0c88ba2659ba --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** Samples for ScalingPlanPersonalSchedules Delete. */ +public final class ScalingPlanPersonalSchedulesDeleteSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Delete.json + */ + /** + * Sample code: ScalingPlanPersonalSchedules_Delete. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPersonalSchedulesDelete( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPersonalSchedules() + .deleteWithResponse( + "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesGetSamples.java new file mode 100644 index 000000000000..1839d2b7d1e1 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesGetSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** Samples for ScalingPlanPersonalSchedules Get. */ +public final class ScalingPlanPersonalSchedulesGetSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Get.json + */ + /** + * Sample code: ScalingPlanPersonalSchedules_Get. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPersonalSchedulesGet( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPersonalSchedules() + .getWithResponse( + "resourceGroup1", + "PersonalScalingPlan1", + "PersonalScalingPlanSchedule", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesListSamples.java new file mode 100644 index 000000000000..3daaa366ec74 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** Samples for ScalingPlanPersonalSchedules List. */ +public final class ScalingPlanPersonalSchedulesListSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_List.json + */ + /** + * Sample code: ScalingPlanPersonalSchedules_List. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPersonalSchedulesList( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPersonalSchedules() + .list("resourceGroup1", "scalingPlan", 10, true, 0, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesUpdateSamples.java new file mode 100644 index 000000000000..a89a76ee5c55 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesUpdateSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedule; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; +import com.azure.resourcemanager.desktopvirtualization.models.Time; + +/** Samples for ScalingPlanPersonalSchedules Update. */ +public final class ScalingPlanPersonalSchedulesUpdateSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Update.json + */ + /** + * Sample code: ScalingPlanPersonalSchedules_Update. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPersonalSchedulesUpdate( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + ScalingPlanPersonalSchedule resource = + manager + .scalingPlanPersonalSchedules() + .getWithResponse( + "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withPeakStartTime(new Time().withHour(8).withMinute(0)) + .withPeakActionOnDisconnect(SessionHandlingOperation.NONE) + .withPeakMinutesToWaitOnDisconnect(10) + .withPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withPeakMinutesToWaitOnLogoff(10) + .withRampDownStartTime(new Time().withHour(18).withMinute(0)) + .withRampDownActionOnDisconnect(SessionHandlingOperation.NONE) + .withRampDownMinutesToWaitOnDisconnect(10) + .withRampDownActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withRampDownMinutesToWaitOnLogoff(10) + .withOffPeakStartTime(new Time().withHour(20).withMinute(0)) + .withOffPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) + .withOffPeakActionOnDisconnect(SessionHandlingOperation.NONE) + .withOffPeakMinutesToWaitOnDisconnect(10) + .withOffPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withOffPeakMinutesToWaitOnLogoff(10) + .apply(); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateSamples.java index ff2ce6542572..57ba8cf561ff 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateSamples.java @@ -12,7 +12,7 @@ /** Samples for ScalingPlanPooledSchedules Create. */ public final class ScalingPlanPooledSchedulesCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Create.json */ /** * Sample code: ScalingPlanPooledSchedules_Create. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java index 898435dd9654..73c7fe42a09d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlanPooledSchedules Delete. */ public final class ScalingPlanPooledSchedulesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Delete.json */ /** * Sample code: ScalingPlanPooledSchedules_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java index 6f84a2b549e6..c709d6102088 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlanPooledSchedules Get. */ public final class ScalingPlanPooledSchedulesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Get.json */ /** * Sample code: ScalingPlanPooledSchedules_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java index abf613205fb8..695c3fb9c5bb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlanPooledSchedules List. */ public final class ScalingPlanPooledSchedulesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_List.json */ /** * Sample code: ScalingPlanPooledSchedules_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java index 51d238daf9d1..f9d99313f570 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java @@ -13,7 +13,7 @@ /** Samples for ScalingPlanPooledSchedules Update. */ public final class ScalingPlanPooledSchedulesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Update.json */ /** * Sample code: ScalingPlanPooledSchedules_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansCreateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansCreateSamples.java index 874de8aea6cf..a6b224a2857f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansCreateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansCreateSamples.java @@ -17,7 +17,7 @@ /** Samples for ScalingPlans Create. */ public final class ScalingPlansCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Create.json */ /** * Sample code: ScalingPlans_Create. @@ -75,6 +75,7 @@ public static void scalingPlansCreate( .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteSamples.java index 2574d3b1a3c8..a32071be0bac 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlans Delete. */ public final class ScalingPlansDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Delete.json */ /** * Sample code: ScalingPlans_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java index b73f65f80243..fcb015cb26c0 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlans GetByResourceGroup. */ public final class ScalingPlansGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Get.json */ /** * Sample code: ScalingPlans_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java index 78163b31a73d..0a6e860ab3b6 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlans ListByHostPool. */ public final class ScalingPlansListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListByHostPool.json */ /** * Sample code: ScalingPlan_ListByHostPool. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java index 971c5a6e5bcd..c8e8b6ddc8e3 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlans ListByResourceGroup. */ public final class ScalingPlansListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListByResourceGroup.json */ /** * Sample code: ScalingPlans_ListByResourceGroup. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListSamples.java index 16ec4d7f442b..5f37f255b8d4 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlans List. */ public final class ScalingPlansListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListBySubscription.json */ /** * Sample code: ScalingPlans_ListBySubscription. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansUpdateSamples.java index cf4a3370137e..40f559c3dd7a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for ScalingPlans Update. */ public final class ScalingPlansUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Update.json */ /** * Sample code: ScalingPlans_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java index 146c79713094..dd743a3e0a72 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for SessionHosts Delete. */ public final class SessionHostsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/SessionHost_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Delete.json */ /** * Sample code: SessionHost_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java index f57d9a2dd0c2..9357f442e991 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for SessionHosts Get. */ public final class SessionHostsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/SessionHost_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Get.json */ /** * Sample code: SessionHost_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java index 24348df1abe3..a173fc7631fb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java @@ -7,7 +7,7 @@ /** Samples for SessionHosts List. */ public final class SessionHostsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/SessionHost_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_List.json */ /** * Sample code: SessionHost_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateSamples.java index 7c3630219a7e..94607d6a7c12 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for SessionHosts Update. */ public final class SessionHostsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/SessionHost_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Update.json */ /** * Sample code: SessionHost_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java index 0204984d67e1..aac9de967e81 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java @@ -7,7 +7,7 @@ /** Samples for StartMenuItems List. */ public final class StartMenuItemsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/StartMenuItem_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/StartMenuItem_List.json */ /** * Sample code: StartMenuItem_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java index c0b857c3b636..b6d8cb96e044 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for UserSessions Delete. */ public final class UserSessionsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Delete.json */ /** * Sample code: UserSession_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java index 274ca21bd3df..d8ca961dd9af 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java @@ -7,7 +7,7 @@ /** Samples for UserSessions Disconnect. */ public final class UserSessionsDisconnectSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_Disconnect_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Disconnect_Post.json */ /** * Sample code: UserSession_Disconnect_Post. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java index 1f33a5f72bda..063dcb23c53c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for UserSessions Get. */ public final class UserSessionsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Get.json */ /** * Sample code: UserSession_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java index cf06a9b68bb1..743af2364466 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java @@ -7,7 +7,7 @@ /** Samples for UserSessions ListByHostPool. */ public final class UserSessionsListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_ListByHostPool.json */ /** * Sample code: UserSession_ListByHostPool. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java index ec22025963b8..b1ad5dc1c671 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java @@ -7,7 +7,7 @@ /** Samples for UserSessions List. */ public final class UserSessionsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_List.json */ /** * Sample code: UserSession_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageSamples.java index 413a075ad1ad..1927a382d8f1 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageSamples.java @@ -9,7 +9,7 @@ /** Samples for UserSessions SendMessage. */ public final class UserSessionsSendMessageSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_SendMessage_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_SendMessage_Post.json */ /** * Sample code: UserSession_SendMessage_Post. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesCreateOrUpdateSamples.java index 1c396aa30454..d00760de9e64 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesCreateOrUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for Workspaces CreateOrUpdate. */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Create.json */ /** * Sample code: Workspace_Create. @@ -30,6 +30,7 @@ public static void workspaceCreate( .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteSamples.java index b05e8dc3c490..6e94a24b977d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces Delete. */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Delete.json */ /** * Sample code: Workspace_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java index 582b3f22d863..0d4bb1ef6d29 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces GetByResourceGroup. */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Get.json */ /** * Sample code: Workspace_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java index a86c72cbb7bc..e19d22123052 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces ListByResourceGroup. */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_ListByResourceGroup.json */ /** * Sample code: Workspace_ListByResourceGroup. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListSamples.java index cc16f8de6bdc..b319baabb4c3 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces List. */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_ListBySubscription.json */ /** * Sample code: Workspace_ListBySubscription. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesUpdateSamples.java index d5d6925f440e..24be100cd849 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for Workspaces Update. */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Update.json */ /** * Sample code: Workspace_Update. @@ -33,6 +33,7 @@ public static void workspaceUpdate( .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePatchPropertiesTests.java index cfbd9449fb73..275cfc87770b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePatchPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePatchPropertiesTests.java @@ -18,12 +18,12 @@ public void testDeserialize() throws Exception { AgentUpdatePatchProperties model = BinaryData .fromString( - "{\"type\":\"Default\",\"useSessionHostLocalTime\":false,\"maintenanceWindowTimeZone\":\"ocmbqfqvmkcxoza\",\"maintenanceWindows\":[{\"hour\":2066979028,\"dayOfWeek\":\"Thursday\"},{\"hour\":1663002651,\"dayOfWeek\":\"Friday\"},{\"hour\":1689859600,\"dayOfWeek\":\"Tuesday\"}]}") + "{\"type\":\"Scheduled\",\"useSessionHostLocalTime\":false,\"maintenanceWindowTimeZone\":\"lzywemhzrncsdtc\",\"maintenanceWindows\":[{\"hour\":2121256273,\"dayOfWeek\":\"Thursday\"},{\"hour\":1674447280,\"dayOfWeek\":\"Thursday\"}]}") .toObject(AgentUpdatePatchProperties.class); - Assertions.assertEquals(SessionHostComponentUpdateType.DEFAULT, model.type()); + Assertions.assertEquals(SessionHostComponentUpdateType.SCHEDULED, model.type()); Assertions.assertEquals(false, model.useSessionHostLocalTime()); - Assertions.assertEquals("ocmbqfqvmkcxoza", model.maintenanceWindowTimeZone()); - Assertions.assertEquals(2066979028, model.maintenanceWindows().get(0).hour()); + Assertions.assertEquals("lzywemhzrncsdtc", model.maintenanceWindowTimeZone()); + Assertions.assertEquals(2121256273, model.maintenanceWindows().get(0).hour()); Assertions.assertEquals(DayOfWeek.THURSDAY, model.maintenanceWindows().get(0).dayOfWeek()); } @@ -31,24 +31,23 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { AgentUpdatePatchProperties model = new AgentUpdatePatchProperties() - .withType(SessionHostComponentUpdateType.DEFAULT) + .withType(SessionHostComponentUpdateType.SCHEDULED) .withUseSessionHostLocalTime(false) - .withMaintenanceWindowTimeZone("ocmbqfqvmkcxoza") + .withMaintenanceWindowTimeZone("lzywemhzrncsdtc") .withMaintenanceWindows( Arrays .asList( new MaintenanceWindowPatchProperties() - .withHour(2066979028) + .withHour(2121256273) .withDayOfWeek(DayOfWeek.THURSDAY), - new MaintenanceWindowPatchProperties().withHour(1663002651).withDayOfWeek(DayOfWeek.FRIDAY), new MaintenanceWindowPatchProperties() - .withHour(1689859600) - .withDayOfWeek(DayOfWeek.TUESDAY))); + .withHour(1674447280) + .withDayOfWeek(DayOfWeek.THURSDAY))); model = BinaryData.fromObject(model).toObject(AgentUpdatePatchProperties.class); - Assertions.assertEquals(SessionHostComponentUpdateType.DEFAULT, model.type()); + Assertions.assertEquals(SessionHostComponentUpdateType.SCHEDULED, model.type()); Assertions.assertEquals(false, model.useSessionHostLocalTime()); - Assertions.assertEquals("ocmbqfqvmkcxoza", model.maintenanceWindowTimeZone()); - Assertions.assertEquals(2066979028, model.maintenanceWindows().get(0).hour()); + Assertions.assertEquals("lzywemhzrncsdtc", model.maintenanceWindowTimeZone()); + Assertions.assertEquals(2121256273, model.maintenanceWindows().get(0).hour()); Assertions.assertEquals(DayOfWeek.THURSDAY, model.maintenanceWindows().get(0).dayOfWeek()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePropertiesTests.java index 16927749969c..bd031a6ba1a4 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePropertiesTests.java @@ -18,33 +18,33 @@ public void testDeserialize() throws Exception { AgentUpdateProperties model = BinaryData .fromString( - "{\"type\":\"Default\",\"useSessionHostLocalTime\":true,\"maintenanceWindowTimeZone\":\"railvpnppfuf\",\"maintenanceWindows\":[{\"hour\":395833055,\"dayOfWeek\":\"Friday\"},{\"hour\":1444401866,\"dayOfWeek\":\"Friday\"},{\"hour\":1095036678,\"dayOfWeek\":\"Sunday\"}]}") + "{\"type\":\"Scheduled\",\"useSessionHostLocalTime\":true,\"maintenanceWindowTimeZone\":\"kopbminrf\",\"maintenanceWindows\":[{\"hour\":1704063633,\"dayOfWeek\":\"Tuesday\"},{\"hour\":1209901082,\"dayOfWeek\":\"Monday\"},{\"hour\":2008385948,\"dayOfWeek\":\"Wednesday\"}]}") .toObject(AgentUpdateProperties.class); - Assertions.assertEquals(SessionHostComponentUpdateType.DEFAULT, model.type()); + Assertions.assertEquals(SessionHostComponentUpdateType.SCHEDULED, model.type()); Assertions.assertEquals(true, model.useSessionHostLocalTime()); - Assertions.assertEquals("railvpnppfuf", model.maintenanceWindowTimeZone()); - Assertions.assertEquals(395833055, model.maintenanceWindows().get(0).hour()); - Assertions.assertEquals(DayOfWeek.FRIDAY, model.maintenanceWindows().get(0).dayOfWeek()); + Assertions.assertEquals("kopbminrf", model.maintenanceWindowTimeZone()); + Assertions.assertEquals(1704063633, model.maintenanceWindows().get(0).hour()); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.maintenanceWindows().get(0).dayOfWeek()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AgentUpdateProperties model = new AgentUpdateProperties() - .withType(SessionHostComponentUpdateType.DEFAULT) + .withType(SessionHostComponentUpdateType.SCHEDULED) .withUseSessionHostLocalTime(true) - .withMaintenanceWindowTimeZone("railvpnppfuf") + .withMaintenanceWindowTimeZone("kopbminrf") .withMaintenanceWindows( Arrays .asList( - new MaintenanceWindowProperties().withHour(395833055).withDayOfWeek(DayOfWeek.FRIDAY), - new MaintenanceWindowProperties().withHour(1444401866).withDayOfWeek(DayOfWeek.FRIDAY), - new MaintenanceWindowProperties().withHour(1095036678).withDayOfWeek(DayOfWeek.SUNDAY))); + new MaintenanceWindowProperties().withHour(1704063633).withDayOfWeek(DayOfWeek.TUESDAY), + new MaintenanceWindowProperties().withHour(1209901082).withDayOfWeek(DayOfWeek.MONDAY), + new MaintenanceWindowProperties().withHour(2008385948).withDayOfWeek(DayOfWeek.WEDNESDAY))); model = BinaryData.fromObject(model).toObject(AgentUpdateProperties.class); - Assertions.assertEquals(SessionHostComponentUpdateType.DEFAULT, model.type()); + Assertions.assertEquals(SessionHostComponentUpdateType.SCHEDULED, model.type()); Assertions.assertEquals(true, model.useSessionHostLocalTime()); - Assertions.assertEquals("railvpnppfuf", model.maintenanceWindowTimeZone()); - Assertions.assertEquals(395833055, model.maintenanceWindows().get(0).hour()); - Assertions.assertEquals(DayOfWeek.FRIDAY, model.maintenanceWindows().get(0).dayOfWeek()); + Assertions.assertEquals("kopbminrf", model.maintenanceWindowTimeZone()); + Assertions.assertEquals(1704063633, model.maintenanceWindows().get(0).hour()); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.maintenanceWindows().get(0).dayOfWeek()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchPropertiesTests.java index 582cc7d94a46..6f22ff4e82f3 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchPropertiesTests.java @@ -13,18 +13,23 @@ public final class ApplicationGroupPatchPropertiesTests { public void testDeserialize() throws Exception { ApplicationGroupPatchProperties model = BinaryData - .fromString("{\"description\":\"hvgyuguosvmk\",\"friendlyName\":\"sxqu\"}") + .fromString("{\"description\":\"hjpglkf\",\"friendlyName\":\"hdneuelfph\",\"showInFeed\":true}") .toObject(ApplicationGroupPatchProperties.class); - Assertions.assertEquals("hvgyuguosvmk", model.description()); - Assertions.assertEquals("sxqu", model.friendlyName()); + Assertions.assertEquals("hjpglkf", model.description()); + Assertions.assertEquals("hdneuelfph", model.friendlyName()); + Assertions.assertEquals(true, model.showInFeed()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationGroupPatchProperties model = - new ApplicationGroupPatchProperties().withDescription("hvgyuguosvmk").withFriendlyName("sxqu"); + new ApplicationGroupPatchProperties() + .withDescription("hjpglkf") + .withFriendlyName("hdneuelfph") + .withShowInFeed(true); model = BinaryData.fromObject(model).toObject(ApplicationGroupPatchProperties.class); - Assertions.assertEquals("hvgyuguosvmk", model.description()); - Assertions.assertEquals("sxqu", model.friendlyName()); + Assertions.assertEquals("hjpglkf", model.description()); + Assertions.assertEquals("hdneuelfph", model.friendlyName()); + Assertions.assertEquals(true, model.showInFeed()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchTests.java index 30e734deeae9..6296f5135968 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchTests.java @@ -16,26 +16,39 @@ public void testDeserialize() throws Exception { ApplicationGroupPatch model = BinaryData .fromString( - "{\"tags\":{\"axibxujw\":\"biexzfeyu\",\"muzyoxaepdk\":\"hqwa\",\"rhdwbavxbniw\":\"jancu\"},\"properties\":{\"description\":\"wz\",\"friendlyName\":\"dbpgnxytxhp\"},\"id\":\"xbzpfzab\",\"name\":\"lcuhxwtctyqiklb\",\"type\":\"ovplw\"}") + "{\"tags\":{\"wakbogqxndl\":\"obdagxtibqdxb\",\"uriplbpodxunkb\":\"zgx\",\"lrb\":\"bxmubyynt\",\"l\":\"tkoievseotgq\"},\"properties\":{\"description\":\"u\",\"friendlyName\":\"auwzizxbmpgc\",\"showInFeed\":true},\"id\":\"u\",\"name\":\"muvp\",\"type\":\"ttdumorppxebmnzb\"}") .toObject(ApplicationGroupPatch.class); - Assertions.assertEquals("biexzfeyu", model.tags().get("axibxujw")); - Assertions.assertEquals("wz", model.description()); - Assertions.assertEquals("dbpgnxytxhp", model.friendlyName()); + Assertions.assertEquals("obdagxtibqdxb", model.tags().get("wakbogqxndl")); + Assertions.assertEquals("u", model.description()); + Assertions.assertEquals("auwzizxbmpgc", model.friendlyName()); + Assertions.assertEquals(true, model.showInFeed()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationGroupPatch model = new ApplicationGroupPatch() - .withTags(mapOf("axibxujw", "biexzfeyu", "muzyoxaepdk", "hqwa", "rhdwbavxbniw", "jancu")) - .withDescription("wz") - .withFriendlyName("dbpgnxytxhp"); + .withTags( + mapOf( + "wakbogqxndl", + "obdagxtibqdxb", + "uriplbpodxunkb", + "zgx", + "lrb", + "bxmubyynt", + "l", + "tkoievseotgq")) + .withDescription("u") + .withFriendlyName("auwzizxbmpgc") + .withShowInFeed(true); model = BinaryData.fromObject(model).toObject(ApplicationGroupPatch.class); - Assertions.assertEquals("biexzfeyu", model.tags().get("axibxujw")); - Assertions.assertEquals("wz", model.description()); - Assertions.assertEquals("dbpgnxytxhp", model.friendlyName()); + Assertions.assertEquals("obdagxtibqdxb", model.tags().get("wakbogqxndl")); + Assertions.assertEquals("u", model.description()); + Assertions.assertEquals("auwzizxbmpgc", model.friendlyName()); + Assertions.assertEquals(true, model.showInFeed()); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPropertiesTests.java index aac23f36140b..1abb205efdc2 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPropertiesTests.java @@ -15,26 +15,29 @@ public void testDeserialize() throws Exception { ApplicationGroupProperties model = BinaryData .fromString( - "{\"objectId\":\"lqidyby\",\"description\":\"zfcl\",\"friendlyName\":\"axdbabph\",\"hostPoolArmPath\":\"wrqlfktsthsuco\",\"workspaceArmPath\":\"nyyazttbtwwrqpue\",\"applicationGroupType\":\"Desktop\",\"cloudPcResource\":false}") + "{\"objectId\":\"tppjflcx\",\"description\":\"aokonzmnsik\",\"friendlyName\":\"kqze\",\"hostPoolArmPath\":\"qkdltfz\",\"workspaceArmPath\":\"hhvh\",\"applicationGroupType\":\"RemoteApp\",\"cloudPcResource\":true,\"showInFeed\":true}") .toObject(ApplicationGroupProperties.class); - Assertions.assertEquals("zfcl", model.description()); - Assertions.assertEquals("axdbabph", model.friendlyName()); - Assertions.assertEquals("wrqlfktsthsuco", model.hostPoolArmPath()); - Assertions.assertEquals(ApplicationGroupType.DESKTOP, model.applicationGroupType()); + Assertions.assertEquals("aokonzmnsik", model.description()); + Assertions.assertEquals("kqze", model.friendlyName()); + Assertions.assertEquals("qkdltfz", model.hostPoolArmPath()); + Assertions.assertEquals(ApplicationGroupType.REMOTE_APP, model.applicationGroupType()); + Assertions.assertEquals(true, model.showInFeed()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationGroupProperties model = new ApplicationGroupProperties() - .withDescription("zfcl") - .withFriendlyName("axdbabph") - .withHostPoolArmPath("wrqlfktsthsuco") - .withApplicationGroupType(ApplicationGroupType.DESKTOP); + .withDescription("aokonzmnsik") + .withFriendlyName("kqze") + .withHostPoolArmPath("qkdltfz") + .withApplicationGroupType(ApplicationGroupType.REMOTE_APP) + .withShowInFeed(true); model = BinaryData.fromObject(model).toObject(ApplicationGroupProperties.class); - Assertions.assertEquals("zfcl", model.description()); - Assertions.assertEquals("axdbabph", model.friendlyName()); - Assertions.assertEquals("wrqlfktsthsuco", model.hostPoolArmPath()); - Assertions.assertEquals(ApplicationGroupType.DESKTOP, model.applicationGroupType()); + Assertions.assertEquals("aokonzmnsik", model.description()); + Assertions.assertEquals("kqze", model.friendlyName()); + Assertions.assertEquals("qkdltfz", model.hostPoolArmPath()); + Assertions.assertEquals(ApplicationGroupType.REMOTE_APP, model.applicationGroupType()); + Assertions.assertEquals(true, model.showInFeed()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteByResourceGroupWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteByResourceGroupWithResponseMockTests.java index 4b8ae2b8f4d3..996ef82e2dfe 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteByResourceGroupWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteByResourceGroupWithResponseMockTests.java @@ -56,6 +56,8 @@ public void testDeleteWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.applicationGroups().deleteByResourceGroupWithResponse("u", "rj", com.azure.core.util.Context.NONE); + manager + .applicationGroups() + .deleteByResourceGroupWithResponse("kxxpvbrd", "jmzsyzfh", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationInnerTests.java index 273c6c8d8643..302fda66e8f0 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationInnerTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationInnerTests.java @@ -16,47 +16,47 @@ public void testDeserialize() throws Exception { ApplicationInner model = BinaryData .fromString( - "{\"properties\":{\"objectId\":\"shsfwxosowzxcu\",\"description\":\"cjooxdjebwpucwwf\",\"friendlyName\":\"vbvmeu\",\"filePath\":\"ivyhzceuojgjrwju\",\"msixPackageFamilyName\":\"otwmcdyt\",\"msixPackageApplicationId\":\"wit\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"Allow\",\"commandLineArguments\":\"wgqwgxhn\",\"showInPortal\":true,\"iconPath\":\"fbkp\",\"iconIndex\":1098465372,\"iconHash\":\"lwn\"},\"id\":\"hjdauwhvylwz\",\"name\":\"tdhxujznbmpowuwp\",\"type\":\"zqlveualupjmkhf\"}") + "{\"properties\":{\"objectId\":\"uqgbdbutauvfbt\",\"description\":\"whhmhykojo\",\"friendlyName\":\"fnndl\",\"filePath\":\"chkoymkcdyh\",\"msixPackageFamilyName\":\"kkpwdreqnovvq\",\"msixPackageApplicationId\":\"vljxywsu\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"Allow\",\"commandLineArguments\":\"ndsytgadg\",\"showInPortal\":true,\"iconPath\":\"aeneqnzarrwl\",\"iconIndex\":1397845425,\"iconHash\":\"jfqka\"},\"id\":\"wiipfpub\",\"name\":\"ibwwiftohqkv\",\"type\":\"uvksgplsaknynfsy\"}") .toObject(ApplicationInner.class); - Assertions.assertEquals("cjooxdjebwpucwwf", model.description()); - Assertions.assertEquals("vbvmeu", model.friendlyName()); - Assertions.assertEquals("ivyhzceuojgjrwju", model.filePath()); - Assertions.assertEquals("otwmcdyt", model.msixPackageFamilyName()); - Assertions.assertEquals("wit", model.msixPackageApplicationId()); + Assertions.assertEquals("whhmhykojo", model.description()); + Assertions.assertEquals("fnndl", model.friendlyName()); + Assertions.assertEquals("chkoymkcdyh", model.filePath()); + Assertions.assertEquals("kkpwdreqnovvq", model.msixPackageFamilyName()); + Assertions.assertEquals("vljxywsu", model.msixPackageApplicationId()); Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType()); Assertions.assertEquals(CommandLineSetting.ALLOW, model.commandLineSetting()); - Assertions.assertEquals("wgqwgxhn", model.commandLineArguments()); + Assertions.assertEquals("ndsytgadg", model.commandLineArguments()); Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("fbkp", model.iconPath()); - Assertions.assertEquals(1098465372, model.iconIndex()); + Assertions.assertEquals("aeneqnzarrwl", model.iconPath()); + Assertions.assertEquals(1397845425, model.iconIndex()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationInner model = new ApplicationInner() - .withDescription("cjooxdjebwpucwwf") - .withFriendlyName("vbvmeu") - .withFilePath("ivyhzceuojgjrwju") - .withMsixPackageFamilyName("otwmcdyt") - .withMsixPackageApplicationId("wit") + .withDescription("whhmhykojo") + .withFriendlyName("fnndl") + .withFilePath("chkoymkcdyh") + .withMsixPackageFamilyName("kkpwdreqnovvq") + .withMsixPackageApplicationId("vljxywsu") .withApplicationType(RemoteApplicationType.IN_BUILT) .withCommandLineSetting(CommandLineSetting.ALLOW) - .withCommandLineArguments("wgqwgxhn") + .withCommandLineArguments("ndsytgadg") .withShowInPortal(true) - .withIconPath("fbkp") - .withIconIndex(1098465372); + .withIconPath("aeneqnzarrwl") + .withIconIndex(1397845425); model = BinaryData.fromObject(model).toObject(ApplicationInner.class); - Assertions.assertEquals("cjooxdjebwpucwwf", model.description()); - Assertions.assertEquals("vbvmeu", model.friendlyName()); - Assertions.assertEquals("ivyhzceuojgjrwju", model.filePath()); - Assertions.assertEquals("otwmcdyt", model.msixPackageFamilyName()); - Assertions.assertEquals("wit", model.msixPackageApplicationId()); + Assertions.assertEquals("whhmhykojo", model.description()); + Assertions.assertEquals("fnndl", model.friendlyName()); + Assertions.assertEquals("chkoymkcdyh", model.filePath()); + Assertions.assertEquals("kkpwdreqnovvq", model.msixPackageFamilyName()); + Assertions.assertEquals("vljxywsu", model.msixPackageApplicationId()); Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType()); Assertions.assertEquals(CommandLineSetting.ALLOW, model.commandLineSetting()); - Assertions.assertEquals("wgqwgxhn", model.commandLineArguments()); + Assertions.assertEquals("ndsytgadg", model.commandLineArguments()); Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("fbkp", model.iconPath()); - Assertions.assertEquals(1098465372, model.iconIndex()); + Assertions.assertEquals("aeneqnzarrwl", model.iconPath()); + Assertions.assertEquals(1397845425, model.iconIndex()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationListTests.java index 034d8a292d38..1f2d5d63af09 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationListTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationListTests.java @@ -18,19 +18,19 @@ public void testDeserialize() throws Exception { ApplicationList model = BinaryData .fromString( - "{\"value\":[{\"properties\":{\"objectId\":\"o\",\"description\":\"bnxknalaulppg\",\"friendlyName\":\"tpnapnyiropuhpig\",\"filePath\":\"gylgqgitxmedjvcs\",\"msixPackageFamilyName\":\"n\",\"msixPackageApplicationId\":\"wncwzzhxgktrmg\",\"applicationType\":\"MsixApplication\",\"commandLineSetting\":\"DoNotAllow\",\"commandLineArguments\":\"kteo\",\"showInPortal\":false,\"iconPath\":\"pt\",\"iconIndex\":1401142659,\"iconHash\":\"pfqbuaceopzf\"},\"id\":\"hhuao\",\"name\":\"ppcqeqxolz\",\"type\":\"ahzxctobgbk\"},{\"properties\":{\"objectId\":\"izpost\",\"description\":\"rcfbunrm\",\"friendlyName\":\"jhhkxbp\",\"filePath\":\"ymjhxxjyngudivkr\",\"msixPackageFamilyName\":\"wbxqzvszjfau\",\"msixPackageApplicationId\":\"fdxxivetvtcqaqtd\",\"applicationType\":\"MsixApplication\",\"commandLineSetting\":\"Allow\",\"commandLineArguments\":\"xv\",\"showInPortal\":false,\"iconPath\":\"slqb\",\"iconIndex\":92665469,\"iconHash\":\"obl\"},\"id\":\"k\",\"name\":\"lmpewwwfbkr\",\"type\":\"rn\"},{\"properties\":{\"objectId\":\"hqjohxcrsbfova\",\"description\":\"ruvw\",\"friendlyName\":\"sqfsubcgjbirxb\",\"filePath\":\"bsrfbj\",\"msixPackageFamilyName\":\"twss\",\"msixPackageApplicationId\":\"ftpvjzbexil\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"DoNotAllow\",\"commandLineArguments\":\"q\",\"showInPortal\":false,\"iconPath\":\"mqtaruoujmkcjh\",\"iconIndex\":1420775781,\"iconHash\":\"jrybnwjewgdrjer\"},\"id\":\"aen\",\"name\":\"pehindoygm\",\"type\":\"fthnzdn\"}],\"nextLink\":\"l\"}") + "{\"value\":[{\"properties\":{\"objectId\":\"hfjx\",\"description\":\"szkkfoqre\",\"friendlyName\":\"kzikfjawneaivxwc\",\"filePath\":\"lpcirelsf\",\"msixPackageFamilyName\":\"enwabfatk\",\"msixPackageApplicationId\":\"dxbjhwuaanozj\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"Require\",\"commandLineArguments\":\"oulpjrv\",\"showInPortal\":true,\"iconPath\":\"rvimjwosytxitcsk\",\"iconIndex\":212130052,\"iconHash\":\"qumiek\"},\"id\":\"zzikhlyfjhdg\",\"name\":\"gge\",\"type\":\"dunyg\"},{\"properties\":{\"objectId\":\"idb\",\"description\":\"atpxl\",\"friendlyName\":\"xcyjmoadsuvarmy\",\"filePath\":\"mjsjqb\",\"msixPackageFamilyName\":\"hyxxrwlycoduhpk\",\"msixPackageApplicationId\":\"gymare\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"Require\",\"commandLineArguments\":\"qugjhkycube\",\"showInPortal\":false,\"iconPath\":\"sofwqmzqalkrmnji\",\"iconIndex\":988494266,\"iconHash\":\"cqqudf\"},\"id\":\"yxbaaabjyvayf\",\"name\":\"imrzrtuzqog\",\"type\":\"exn\"},{\"properties\":{\"objectId\":\"dnw\",\"description\":\"mewzsyyc\",\"friendlyName\":\"zsoibjudpfrxtr\",\"filePath\":\"zvaytdwkqbr\",\"msixPackageFamilyName\":\"bpaxhexiilivpdt\",\"msixPackageApplicationId\":\"r\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"DoNotAllow\",\"commandLineArguments\":\"axoruzfgsquy\",\"showInPortal\":false,\"iconPath\":\"xleptramx\",\"iconIndex\":726747953,\"iconHash\":\"lwnwxuqlcvydyp\"},\"id\":\"dooaojkniodko\",\"name\":\"ebwnujhe\",\"type\":\"msbvdkcrodtjinf\"},{\"properties\":{\"objectId\":\"fltkacjv\",\"description\":\"kdlfoa\",\"friendlyName\":\"gkfpaga\",\"filePath\":\"pulpqblylsyxk\",\"msixPackageFamilyName\":\"nsj\",\"msixPackageApplicationId\":\"vti\",\"applicationType\":\"MsixApplication\",\"commandLineSetting\":\"DoNotAllow\",\"commandLineArguments\":\"sz\",\"showInPortal\":true,\"iconPath\":\"sbzkf\",\"iconIndex\":1389741266,\"iconHash\":\"v\"},\"id\":\"qi\",\"name\":\"vinvkj\",\"type\":\"xdxr\"}],\"nextLink\":\"ukzclewyhmlwpaz\"}") .toObject(ApplicationList.class); - Assertions.assertEquals("bnxknalaulppg", model.value().get(0).description()); - Assertions.assertEquals("tpnapnyiropuhpig", model.value().get(0).friendlyName()); - Assertions.assertEquals("gylgqgitxmedjvcs", model.value().get(0).filePath()); - Assertions.assertEquals("n", model.value().get(0).msixPackageFamilyName()); - Assertions.assertEquals("wncwzzhxgktrmg", model.value().get(0).msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.MSIX_APPLICATION, model.value().get(0).applicationType()); - Assertions.assertEquals(CommandLineSetting.DO_NOT_ALLOW, model.value().get(0).commandLineSetting()); - Assertions.assertEquals("kteo", model.value().get(0).commandLineArguments()); - Assertions.assertEquals(false, model.value().get(0).showInPortal()); - Assertions.assertEquals("pt", model.value().get(0).iconPath()); - Assertions.assertEquals(1401142659, model.value().get(0).iconIndex()); + Assertions.assertEquals("szkkfoqre", model.value().get(0).description()); + Assertions.assertEquals("kzikfjawneaivxwc", model.value().get(0).friendlyName()); + Assertions.assertEquals("lpcirelsf", model.value().get(0).filePath()); + Assertions.assertEquals("enwabfatk", model.value().get(0).msixPackageFamilyName()); + Assertions.assertEquals("dxbjhwuaanozj", model.value().get(0).msixPackageApplicationId()); + Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.value().get(0).applicationType()); + Assertions.assertEquals(CommandLineSetting.REQUIRE, model.value().get(0).commandLineSetting()); + Assertions.assertEquals("oulpjrv", model.value().get(0).commandLineArguments()); + Assertions.assertEquals(true, model.value().get(0).showInPortal()); + Assertions.assertEquals("rvimjwosytxitcsk", model.value().get(0).iconPath()); + Assertions.assertEquals(212130052, model.value().get(0).iconIndex()); } @org.junit.jupiter.api.Test @@ -41,52 +41,64 @@ public void testSerialize() throws Exception { Arrays .asList( new ApplicationInner() - .withDescription("bnxknalaulppg") - .withFriendlyName("tpnapnyiropuhpig") - .withFilePath("gylgqgitxmedjvcs") - .withMsixPackageFamilyName("n") - .withMsixPackageApplicationId("wncwzzhxgktrmg") - .withApplicationType(RemoteApplicationType.MSIX_APPLICATION) - .withCommandLineSetting(CommandLineSetting.DO_NOT_ALLOW) - .withCommandLineArguments("kteo") - .withShowInPortal(false) - .withIconPath("pt") - .withIconIndex(1401142659), + .withDescription("szkkfoqre") + .withFriendlyName("kzikfjawneaivxwc") + .withFilePath("lpcirelsf") + .withMsixPackageFamilyName("enwabfatk") + .withMsixPackageApplicationId("dxbjhwuaanozj") + .withApplicationType(RemoteApplicationType.IN_BUILT) + .withCommandLineSetting(CommandLineSetting.REQUIRE) + .withCommandLineArguments("oulpjrv") + .withShowInPortal(true) + .withIconPath("rvimjwosytxitcsk") + .withIconIndex(212130052), new ApplicationInner() - .withDescription("rcfbunrm") - .withFriendlyName("jhhkxbp") - .withFilePath("ymjhxxjyngudivkr") - .withMsixPackageFamilyName("wbxqzvszjfau") - .withMsixPackageApplicationId("fdxxivetvtcqaqtd") - .withApplicationType(RemoteApplicationType.MSIX_APPLICATION) - .withCommandLineSetting(CommandLineSetting.ALLOW) - .withCommandLineArguments("xv") + .withDescription("atpxl") + .withFriendlyName("xcyjmoadsuvarmy") + .withFilePath("mjsjqb") + .withMsixPackageFamilyName("hyxxrwlycoduhpk") + .withMsixPackageApplicationId("gymare") + .withApplicationType(RemoteApplicationType.IN_BUILT) + .withCommandLineSetting(CommandLineSetting.REQUIRE) + .withCommandLineArguments("qugjhkycube") .withShowInPortal(false) - .withIconPath("slqb") - .withIconIndex(92665469), + .withIconPath("sofwqmzqalkrmnji") + .withIconIndex(988494266), new ApplicationInner() - .withDescription("ruvw") - .withFriendlyName("sqfsubcgjbirxb") - .withFilePath("bsrfbj") - .withMsixPackageFamilyName("twss") - .withMsixPackageApplicationId("ftpvjzbexil") + .withDescription("mewzsyyc") + .withFriendlyName("zsoibjudpfrxtr") + .withFilePath("zvaytdwkqbr") + .withMsixPackageFamilyName("bpaxhexiilivpdt") + .withMsixPackageApplicationId("r") .withApplicationType(RemoteApplicationType.IN_BUILT) .withCommandLineSetting(CommandLineSetting.DO_NOT_ALLOW) - .withCommandLineArguments("q") + .withCommandLineArguments("axoruzfgsquy") .withShowInPortal(false) - .withIconPath("mqtaruoujmkcjh") - .withIconIndex(1420775781))); + .withIconPath("xleptramx") + .withIconIndex(726747953), + new ApplicationInner() + .withDescription("kdlfoa") + .withFriendlyName("gkfpaga") + .withFilePath("pulpqblylsyxk") + .withMsixPackageFamilyName("nsj") + .withMsixPackageApplicationId("vti") + .withApplicationType(RemoteApplicationType.MSIX_APPLICATION) + .withCommandLineSetting(CommandLineSetting.DO_NOT_ALLOW) + .withCommandLineArguments("sz") + .withShowInPortal(true) + .withIconPath("sbzkf") + .withIconIndex(1389741266))); model = BinaryData.fromObject(model).toObject(ApplicationList.class); - Assertions.assertEquals("bnxknalaulppg", model.value().get(0).description()); - Assertions.assertEquals("tpnapnyiropuhpig", model.value().get(0).friendlyName()); - Assertions.assertEquals("gylgqgitxmedjvcs", model.value().get(0).filePath()); - Assertions.assertEquals("n", model.value().get(0).msixPackageFamilyName()); - Assertions.assertEquals("wncwzzhxgktrmg", model.value().get(0).msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.MSIX_APPLICATION, model.value().get(0).applicationType()); - Assertions.assertEquals(CommandLineSetting.DO_NOT_ALLOW, model.value().get(0).commandLineSetting()); - Assertions.assertEquals("kteo", model.value().get(0).commandLineArguments()); - Assertions.assertEquals(false, model.value().get(0).showInPortal()); - Assertions.assertEquals("pt", model.value().get(0).iconPath()); - Assertions.assertEquals(1401142659, model.value().get(0).iconIndex()); + Assertions.assertEquals("szkkfoqre", model.value().get(0).description()); + Assertions.assertEquals("kzikfjawneaivxwc", model.value().get(0).friendlyName()); + Assertions.assertEquals("lpcirelsf", model.value().get(0).filePath()); + Assertions.assertEquals("enwabfatk", model.value().get(0).msixPackageFamilyName()); + Assertions.assertEquals("dxbjhwuaanozj", model.value().get(0).msixPackageApplicationId()); + Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.value().get(0).applicationType()); + Assertions.assertEquals(CommandLineSetting.REQUIRE, model.value().get(0).commandLineSetting()); + Assertions.assertEquals("oulpjrv", model.value().get(0).commandLineArguments()); + Assertions.assertEquals(true, model.value().get(0).showInPortal()); + Assertions.assertEquals("rvimjwosytxitcsk", model.value().get(0).iconPath()); + Assertions.assertEquals(212130052, model.value().get(0).iconIndex()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchPropertiesTests.java index 3542b0c31711..384e7e960c59 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchPropertiesTests.java @@ -16,47 +16,47 @@ public void testDeserialize() throws Exception { ApplicationPatchProperties model = BinaryData .fromString( - "{\"description\":\"ofd\",\"friendlyName\":\"uusdttouwa\",\"filePath\":\"ekqvkeln\",\"commandLineSetting\":\"DoNotAllow\",\"commandLineArguments\":\"xwyjsflhhc\",\"showInPortal\":true,\"iconPath\":\"jixisxyawjoyaqcs\",\"iconIndex\":2113030944,\"msixPackageFamilyName\":\"kiidzyex\",\"msixPackageApplicationId\":\"eli\",\"applicationType\":\"InBuilt\"}") + "{\"description\":\"kzivgvvcnayrh\",\"friendlyName\":\"nxxmueedndrdv\",\"filePath\":\"kwqqtchealmf\",\"commandLineSetting\":\"Allow\",\"commandLineArguments\":\"aygdvwvgpioh\",\"showInPortal\":true,\"iconPath\":\"tfudxepx\",\"iconIndex\":1784889493,\"msixPackageFamilyName\":\"gvr\",\"msixPackageApplicationId\":\"npkukghimdblx\",\"applicationType\":\"MsixApplication\"}") .toObject(ApplicationPatchProperties.class); - Assertions.assertEquals("ofd", model.description()); - Assertions.assertEquals("uusdttouwa", model.friendlyName()); - Assertions.assertEquals("ekqvkeln", model.filePath()); - Assertions.assertEquals(CommandLineSetting.DO_NOT_ALLOW, model.commandLineSetting()); - Assertions.assertEquals("xwyjsflhhc", model.commandLineArguments()); + Assertions.assertEquals("kzivgvvcnayrh", model.description()); + Assertions.assertEquals("nxxmueedndrdv", model.friendlyName()); + Assertions.assertEquals("kwqqtchealmf", model.filePath()); + Assertions.assertEquals(CommandLineSetting.ALLOW, model.commandLineSetting()); + Assertions.assertEquals("aygdvwvgpioh", model.commandLineArguments()); Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("jixisxyawjoyaqcs", model.iconPath()); - Assertions.assertEquals(2113030944, model.iconIndex()); - Assertions.assertEquals("kiidzyex", model.msixPackageFamilyName()); - Assertions.assertEquals("eli", model.msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType()); + Assertions.assertEquals("tfudxepx", model.iconPath()); + Assertions.assertEquals(1784889493, model.iconIndex()); + Assertions.assertEquals("gvr", model.msixPackageFamilyName()); + Assertions.assertEquals("npkukghimdblx", model.msixPackageApplicationId()); + Assertions.assertEquals(RemoteApplicationType.MSIX_APPLICATION, model.applicationType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationPatchProperties model = new ApplicationPatchProperties() - .withDescription("ofd") - .withFriendlyName("uusdttouwa") - .withFilePath("ekqvkeln") - .withCommandLineSetting(CommandLineSetting.DO_NOT_ALLOW) - .withCommandLineArguments("xwyjsflhhc") + .withDescription("kzivgvvcnayrh") + .withFriendlyName("nxxmueedndrdv") + .withFilePath("kwqqtchealmf") + .withCommandLineSetting(CommandLineSetting.ALLOW) + .withCommandLineArguments("aygdvwvgpioh") .withShowInPortal(true) - .withIconPath("jixisxyawjoyaqcs") - .withIconIndex(2113030944) - .withMsixPackageFamilyName("kiidzyex") - .withMsixPackageApplicationId("eli") - .withApplicationType(RemoteApplicationType.IN_BUILT); + .withIconPath("tfudxepx") + .withIconIndex(1784889493) + .withMsixPackageFamilyName("gvr") + .withMsixPackageApplicationId("npkukghimdblx") + .withApplicationType(RemoteApplicationType.MSIX_APPLICATION); model = BinaryData.fromObject(model).toObject(ApplicationPatchProperties.class); - Assertions.assertEquals("ofd", model.description()); - Assertions.assertEquals("uusdttouwa", model.friendlyName()); - Assertions.assertEquals("ekqvkeln", model.filePath()); - Assertions.assertEquals(CommandLineSetting.DO_NOT_ALLOW, model.commandLineSetting()); - Assertions.assertEquals("xwyjsflhhc", model.commandLineArguments()); + Assertions.assertEquals("kzivgvvcnayrh", model.description()); + Assertions.assertEquals("nxxmueedndrdv", model.friendlyName()); + Assertions.assertEquals("kwqqtchealmf", model.filePath()); + Assertions.assertEquals(CommandLineSetting.ALLOW, model.commandLineSetting()); + Assertions.assertEquals("aygdvwvgpioh", model.commandLineArguments()); Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("jixisxyawjoyaqcs", model.iconPath()); - Assertions.assertEquals(2113030944, model.iconIndex()); - Assertions.assertEquals("kiidzyex", model.msixPackageFamilyName()); - Assertions.assertEquals("eli", model.msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType()); + Assertions.assertEquals("tfudxepx", model.iconPath()); + Assertions.assertEquals(1784889493, model.iconIndex()); + Assertions.assertEquals("gvr", model.msixPackageFamilyName()); + Assertions.assertEquals("npkukghimdblx", model.msixPackageApplicationId()); + Assertions.assertEquals(RemoteApplicationType.MSIX_APPLICATION, model.applicationType()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchTests.java index e86733c9138a..07383cb3cd4a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchTests.java @@ -18,53 +18,54 @@ public void testDeserialize() throws Exception { ApplicationPatch model = BinaryData .fromString( - "{\"tags\":{\"yriwwroyqb\":\"prwmdyvxqt\",\"mefqsgzvahapjyzh\":\"xrmcqibycnojvk\"},\"properties\":{\"description\":\"qzcjrvxdj\",\"friendlyName\":\"mwlxk\",\"filePath\":\"gfhzovawjvzunlut\",\"commandLineSetting\":\"Allow\",\"commandLineArguments\":\"rnxipei\",\"showInPortal\":true,\"iconPath\":\"uaejxdultsk\",\"iconIndex\":618241707,\"msixPackageFamilyName\":\"dzumveekg\",\"msixPackageApplicationId\":\"ozuhkfp\",\"applicationType\":\"MsixApplication\"}}") + "{\"tags\":{\"kotl\":\"wwrlkdmtncv\",\"gsyocogj\":\"xdy\"},\"properties\":{\"description\":\"tbnnha\",\"friendlyName\":\"ocrkvcikh\",\"filePath\":\"p\",\"commandLineSetting\":\"Require\",\"commandLineArguments\":\"x\",\"showInPortal\":false,\"iconPath\":\"zikywgg\",\"iconIndex\":1558005484,\"msixPackageFamilyName\":\"la\",\"msixPackageApplicationId\":\"elwuipi\",\"applicationType\":\"InBuilt\"}}") .toObject(ApplicationPatch.class); - Assertions.assertEquals("prwmdyvxqt", model.tags().get("yriwwroyqb")); - Assertions.assertEquals("qzcjrvxdj", model.description()); - Assertions.assertEquals("mwlxk", model.friendlyName()); - Assertions.assertEquals("gfhzovawjvzunlut", model.filePath()); - Assertions.assertEquals(CommandLineSetting.ALLOW, model.commandLineSetting()); - Assertions.assertEquals("rnxipei", model.commandLineArguments()); - Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("uaejxdultsk", model.iconPath()); - Assertions.assertEquals(618241707, model.iconIndex()); - Assertions.assertEquals("dzumveekg", model.msixPackageFamilyName()); - Assertions.assertEquals("ozuhkfp", model.msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.MSIX_APPLICATION, model.applicationType()); + Assertions.assertEquals("wwrlkdmtncv", model.tags().get("kotl")); + Assertions.assertEquals("tbnnha", model.description()); + Assertions.assertEquals("ocrkvcikh", model.friendlyName()); + Assertions.assertEquals("p", model.filePath()); + Assertions.assertEquals(CommandLineSetting.REQUIRE, model.commandLineSetting()); + Assertions.assertEquals("x", model.commandLineArguments()); + Assertions.assertEquals(false, model.showInPortal()); + Assertions.assertEquals("zikywgg", model.iconPath()); + Assertions.assertEquals(1558005484, model.iconIndex()); + Assertions.assertEquals("la", model.msixPackageFamilyName()); + Assertions.assertEquals("elwuipi", model.msixPackageApplicationId()); + Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationPatch model = new ApplicationPatch() - .withTags(mapOf("yriwwroyqb", "prwmdyvxqt", "mefqsgzvahapjyzh", "xrmcqibycnojvk")) - .withDescription("qzcjrvxdj") - .withFriendlyName("mwlxk") - .withFilePath("gfhzovawjvzunlut") - .withCommandLineSetting(CommandLineSetting.ALLOW) - .withCommandLineArguments("rnxipei") - .withShowInPortal(true) - .withIconPath("uaejxdultsk") - .withIconIndex(618241707) - .withMsixPackageFamilyName("dzumveekg") - .withMsixPackageApplicationId("ozuhkfp") - .withApplicationType(RemoteApplicationType.MSIX_APPLICATION); + .withTags(mapOf("kotl", "wwrlkdmtncv", "gsyocogj", "xdy")) + .withDescription("tbnnha") + .withFriendlyName("ocrkvcikh") + .withFilePath("p") + .withCommandLineSetting(CommandLineSetting.REQUIRE) + .withCommandLineArguments("x") + .withShowInPortal(false) + .withIconPath("zikywgg") + .withIconIndex(1558005484) + .withMsixPackageFamilyName("la") + .withMsixPackageApplicationId("elwuipi") + .withApplicationType(RemoteApplicationType.IN_BUILT); model = BinaryData.fromObject(model).toObject(ApplicationPatch.class); - Assertions.assertEquals("prwmdyvxqt", model.tags().get("yriwwroyqb")); - Assertions.assertEquals("qzcjrvxdj", model.description()); - Assertions.assertEquals("mwlxk", model.friendlyName()); - Assertions.assertEquals("gfhzovawjvzunlut", model.filePath()); - Assertions.assertEquals(CommandLineSetting.ALLOW, model.commandLineSetting()); - Assertions.assertEquals("rnxipei", model.commandLineArguments()); - Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("uaejxdultsk", model.iconPath()); - Assertions.assertEquals(618241707, model.iconIndex()); - Assertions.assertEquals("dzumveekg", model.msixPackageFamilyName()); - Assertions.assertEquals("ozuhkfp", model.msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.MSIX_APPLICATION, model.applicationType()); + Assertions.assertEquals("wwrlkdmtncv", model.tags().get("kotl")); + Assertions.assertEquals("tbnnha", model.description()); + Assertions.assertEquals("ocrkvcikh", model.friendlyName()); + Assertions.assertEquals("p", model.filePath()); + Assertions.assertEquals(CommandLineSetting.REQUIRE, model.commandLineSetting()); + Assertions.assertEquals("x", model.commandLineArguments()); + Assertions.assertEquals(false, model.showInPortal()); + Assertions.assertEquals("zikywgg", model.iconPath()); + Assertions.assertEquals(1558005484, model.iconIndex()); + Assertions.assertEquals("la", model.msixPackageFamilyName()); + Assertions.assertEquals("elwuipi", model.msixPackageApplicationId()); + Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType()); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPropertiesTests.java index 82b9dd7d916d..b6ca27e72897 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPropertiesTests.java @@ -16,47 +16,47 @@ public void testDeserialize() throws Exception { ApplicationProperties model = BinaryData .fromString( - "{\"objectId\":\"bbcswsrtjri\",\"description\":\"rbpbewtghfgblcg\",\"friendlyName\":\"zvlvqhjkbegib\",\"filePath\":\"mxiebw\",\"msixPackageFamilyName\":\"loayqcgw\",\"msixPackageApplicationId\":\"zjuzgwyz\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"Require\",\"commandLineArguments\":\"ngmtsavjcb\",\"showInPortal\":true,\"iconPath\":\"p\",\"iconIndex\":597886702,\"iconHash\":\"ftguv\"}") + "{\"objectId\":\"jphuopxodlqi\",\"description\":\"torzih\",\"friendlyName\":\"osjswsr\",\"filePath\":\"lyzrpzbchckqqzqi\",\"msixPackageFamilyName\":\"iysui\",\"msixPackageApplicationId\":\"ynkedyatrwyhqmib\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"Require\",\"commandLineArguments\":\"tsmypyynpcdp\",\"showInPortal\":true,\"iconPath\":\"g\",\"iconIndex\":83591449,\"iconHash\":\"mabiknsorgjhxb\"}") .toObject(ApplicationProperties.class); - Assertions.assertEquals("rbpbewtghfgblcg", model.description()); - Assertions.assertEquals("zvlvqhjkbegib", model.friendlyName()); - Assertions.assertEquals("mxiebw", model.filePath()); - Assertions.assertEquals("loayqcgw", model.msixPackageFamilyName()); - Assertions.assertEquals("zjuzgwyz", model.msixPackageApplicationId()); + Assertions.assertEquals("torzih", model.description()); + Assertions.assertEquals("osjswsr", model.friendlyName()); + Assertions.assertEquals("lyzrpzbchckqqzqi", model.filePath()); + Assertions.assertEquals("iysui", model.msixPackageFamilyName()); + Assertions.assertEquals("ynkedyatrwyhqmib", model.msixPackageApplicationId()); Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType()); Assertions.assertEquals(CommandLineSetting.REQUIRE, model.commandLineSetting()); - Assertions.assertEquals("ngmtsavjcb", model.commandLineArguments()); + Assertions.assertEquals("tsmypyynpcdp", model.commandLineArguments()); Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("p", model.iconPath()); - Assertions.assertEquals(597886702, model.iconIndex()); + Assertions.assertEquals("g", model.iconPath()); + Assertions.assertEquals(83591449, model.iconIndex()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationProperties model = new ApplicationProperties() - .withDescription("rbpbewtghfgblcg") - .withFriendlyName("zvlvqhjkbegib") - .withFilePath("mxiebw") - .withMsixPackageFamilyName("loayqcgw") - .withMsixPackageApplicationId("zjuzgwyz") + .withDescription("torzih") + .withFriendlyName("osjswsr") + .withFilePath("lyzrpzbchckqqzqi") + .withMsixPackageFamilyName("iysui") + .withMsixPackageApplicationId("ynkedyatrwyhqmib") .withApplicationType(RemoteApplicationType.IN_BUILT) .withCommandLineSetting(CommandLineSetting.REQUIRE) - .withCommandLineArguments("ngmtsavjcb") + .withCommandLineArguments("tsmypyynpcdp") .withShowInPortal(true) - .withIconPath("p") - .withIconIndex(597886702); + .withIconPath("g") + .withIconIndex(83591449); model = BinaryData.fromObject(model).toObject(ApplicationProperties.class); - Assertions.assertEquals("rbpbewtghfgblcg", model.description()); - Assertions.assertEquals("zvlvqhjkbegib", model.friendlyName()); - Assertions.assertEquals("mxiebw", model.filePath()); - Assertions.assertEquals("loayqcgw", model.msixPackageFamilyName()); - Assertions.assertEquals("zjuzgwyz", model.msixPackageApplicationId()); + Assertions.assertEquals("torzih", model.description()); + Assertions.assertEquals("osjswsr", model.friendlyName()); + Assertions.assertEquals("lyzrpzbchckqqzqi", model.filePath()); + Assertions.assertEquals("iysui", model.msixPackageFamilyName()); + Assertions.assertEquals("ynkedyatrwyhqmib", model.msixPackageApplicationId()); Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType()); Assertions.assertEquals(CommandLineSetting.REQUIRE, model.commandLineSetting()); - Assertions.assertEquals("ngmtsavjcb", model.commandLineArguments()); + Assertions.assertEquals("tsmypyynpcdp", model.commandLineArguments()); Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("p", model.iconPath()); - Assertions.assertEquals(597886702, model.iconIndex()); + Assertions.assertEquals("g", model.iconPath()); + Assertions.assertEquals(83591449, model.iconIndex()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateWithResponseMockTests.java index 00b7488b3a0a..9a644553df32 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateWithResponseMockTests.java @@ -33,7 +33,7 @@ public void testCreateOrUpdateWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"objectId\":\"jsvg\",\"description\":\"whryvycytdcl\",\"friendlyName\":\"ccknfnwmbtmvp\",\"filePath\":\"jdhttzaefedxi\",\"msixPackageFamilyName\":\"hrphkmcrjdqn\",\"msixPackageApplicationId\":\"fzpbgtgkyl\",\"applicationType\":\"MsixApplication\",\"commandLineSetting\":\"DoNotAllow\",\"commandLineArguments\":\"jeuut\",\"showInPortal\":false,\"iconPath\":\"z\",\"iconIndex\":2023455303,\"iconHash\":\"kvbwnhhtqlgeh\"},\"id\":\"pipifh\",\"name\":\"f\",\"type\":\"oajvgcxtxjcs\"}"; + "{\"properties\":{\"objectId\":\"qwcabvnui\",\"description\":\"ey\",\"friendlyName\":\"wlpaugmrmfjlrxwt\",\"filePath\":\"ukhfkvc\",\"msixPackageFamilyName\":\"izmoaeds\",\"msixPackageApplicationId\":\"wuived\",\"applicationType\":\"MsixApplication\",\"commandLineSetting\":\"Require\",\"commandLineArguments\":\"ewxeiqbpsm\",\"showInPortal\":false,\"iconPath\":\"u\",\"iconIndex\":468041184,\"iconHash\":\"dlrgms\"},\"id\":\"zgaufcshhvn\",\"name\":\"wgnxkympqanxrj\",\"type\":\"ixt\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -64,31 +64,31 @@ public void testCreateOrUpdateWithResponse() throws Exception { Application response = manager .applications() - .define("ecdmdqbwpy") - .withExistingApplicationGroup("vit", "tvtzeexavoxtfg") - .withCommandLineSetting(CommandLineSetting.ALLOW) - .withDescription("lhhxudbxvodhtnsi") - .withFriendlyName("dhzmmesckdlp") - .withFilePath("zrcxfailcfxwmdbo") - .withMsixPackageFamilyName("fgsftufqob") - .withMsixPackageApplicationId("lnacgcc") - .withApplicationType(RemoteApplicationType.IN_BUILT) - .withCommandLineArguments("kizvytn") + .define("gygqwah") + .withExistingApplicationGroup("dtguk", "anblwphqlkccu") + .withCommandLineSetting(CommandLineSetting.DO_NOT_ALLOW) + .withDescription("d") + .withFriendlyName("ypivlsbb") + .withFilePath("mcub") + .withMsixPackageFamilyName("ifoxxkubvphav") + .withMsixPackageApplicationId("h") + .withApplicationType(RemoteApplicationType.MSIX_APPLICATION) + .withCommandLineArguments("vgovpbbttefjokn") .withShowInPortal(true) - .withIconPath("lj") - .withIconIndex(2075017284) + .withIconPath("zqedikdfrdbi") + .withIconIndex(1455317057) .create(); - Assertions.assertEquals("whryvycytdcl", response.description()); - Assertions.assertEquals("ccknfnwmbtmvp", response.friendlyName()); - Assertions.assertEquals("jdhttzaefedxi", response.filePath()); - Assertions.assertEquals("hrphkmcrjdqn", response.msixPackageFamilyName()); - Assertions.assertEquals("fzpbgtgkyl", response.msixPackageApplicationId()); + Assertions.assertEquals("ey", response.description()); + Assertions.assertEquals("wlpaugmrmfjlrxwt", response.friendlyName()); + Assertions.assertEquals("ukhfkvc", response.filePath()); + Assertions.assertEquals("izmoaeds", response.msixPackageFamilyName()); + Assertions.assertEquals("wuived", response.msixPackageApplicationId()); Assertions.assertEquals(RemoteApplicationType.MSIX_APPLICATION, response.applicationType()); - Assertions.assertEquals(CommandLineSetting.DO_NOT_ALLOW, response.commandLineSetting()); - Assertions.assertEquals("jeuut", response.commandLineArguments()); + Assertions.assertEquals(CommandLineSetting.REQUIRE, response.commandLineSetting()); + Assertions.assertEquals("ewxeiqbpsm", response.commandLineArguments()); Assertions.assertEquals(false, response.showInPortal()); - Assertions.assertEquals("z", response.iconPath()); - Assertions.assertEquals(2023455303, response.iconIndex()); + Assertions.assertEquals("u", response.iconPath()); + Assertions.assertEquals(468041184, response.iconIndex()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteWithResponseMockTests.java index c7bfc5ed64a7..aab6c15bca1c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteWithResponseMockTests.java @@ -58,6 +58,6 @@ public void testDeleteWithResponse() throws Exception { manager .applications() - .deleteWithResponse("jsqzhzbezk", "imsidxasicddyvvj", "kgfmocwahpq", com.azure.core.util.Context.NONE); + .deleteWithResponse("csgguxhemlw", "waeeczgfb", "kklelssxblycs", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetWithResponseMockTests.java index 52c74690589a..763fa29ca168 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetWithResponseMockTests.java @@ -33,7 +33,7 @@ public void testGetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"objectId\":\"vk\",\"description\":\"yzunbixxrtikv\",\"friendlyName\":\"wpgclrcivt\",\"filePath\":\"xfrk\",\"msixPackageFamilyName\":\"xpmyyefrpmpdnq\",\"msixPackageApplicationId\":\"ka\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"Allow\",\"commandLineArguments\":\"mmbnpqfrtql\",\"showInPortal\":false,\"iconPath\":\"gnitgvkxlzyq\",\"iconIndex\":1463810851,\"iconHash\":\"gcealzxwh\"},\"id\":\"nsymoyqhlwigd\",\"name\":\"vbkbxgomf\",\"type\":\"juwasqvdaeyyguxa\"}"; + "{\"properties\":{\"objectId\":\"mdyomkxfbvfbh\",\"description\":\"i\",\"friendlyName\":\"pwpgddei\",\"filePath\":\"wzovgk\",\"msixPackageFamilyName\":\"muikjcjcaztbws\",\"msixPackageApplicationId\":\"qowxwcom\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"DoNotAllow\",\"commandLineArguments\":\"wvczcswkacve\",\"showInPortal\":false,\"iconPath\":\"vlvhbwrnfxtgd\",\"iconIndex\":994119130,\"iconHash\":\"hehnmnaoya\"},\"id\":\"coeqswankltytm\",\"name\":\"droznn\",\"type\":\"drlktg\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -64,19 +64,19 @@ public void testGetWithResponse() throws Exception { Application response = manager .applications() - .getWithResponse("nygq", "nfwqzdzgtilaxhn", "hqlyvijo", com.azure.core.util.Context.NONE) + .getWithResponse("qwjksghudgz", "xog", "ggsvoujkxibdaf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("yzunbixxrtikv", response.description()); - Assertions.assertEquals("wpgclrcivt", response.friendlyName()); - Assertions.assertEquals("xfrk", response.filePath()); - Assertions.assertEquals("xpmyyefrpmpdnq", response.msixPackageFamilyName()); - Assertions.assertEquals("ka", response.msixPackageApplicationId()); + Assertions.assertEquals("i", response.description()); + Assertions.assertEquals("pwpgddei", response.friendlyName()); + Assertions.assertEquals("wzovgk", response.filePath()); + Assertions.assertEquals("muikjcjcaztbws", response.msixPackageFamilyName()); + Assertions.assertEquals("qowxwcom", response.msixPackageApplicationId()); Assertions.assertEquals(RemoteApplicationType.IN_BUILT, response.applicationType()); - Assertions.assertEquals(CommandLineSetting.ALLOW, response.commandLineSetting()); - Assertions.assertEquals("mmbnpqfrtql", response.commandLineArguments()); + Assertions.assertEquals(CommandLineSetting.DO_NOT_ALLOW, response.commandLineSetting()); + Assertions.assertEquals("wvczcswkacve", response.commandLineArguments()); Assertions.assertEquals(false, response.showInPortal()); - Assertions.assertEquals("gnitgvkxlzyq", response.iconPath()); - Assertions.assertEquals(1463810851, response.iconIndex()); + Assertions.assertEquals("vlvhbwrnfxtgd", response.iconPath()); + Assertions.assertEquals(994119130, response.iconIndex()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListMockTests.java index fff6bab9968e..6aec93df29f2 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListMockTests.java @@ -34,7 +34,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"properties\":{\"objectId\":\"jjidjk\",\"description\":\"xkyxvxevblbj\",\"friendlyName\":\"nljlageuaulx\",\"filePath\":\"smjbnkppxyn\",\"msixPackageFamilyName\":\"lsvxeizz\",\"msixPackageApplicationId\":\"klnsrmffey\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"Require\",\"commandLineArguments\":\"piymerteea\",\"showInPortal\":true,\"iconPath\":\"iekkkzddrtkgdojb\",\"iconIndex\":494588403,\"iconHash\":\"vrefdeesv\"},\"id\":\"uij\",\"name\":\"xtxsuwprtujw\",\"type\":\"awddjibab\"}]}"; + "{\"value\":[{\"properties\":{\"objectId\":\"bidyv\",\"description\":\"owx\",\"friendlyName\":\"piudeugfsxzecpa\",\"filePath\":\"kufykhvu\",\"msixPackageFamilyName\":\"epmrut\",\"msixPackageApplicationId\":\"abaobnslujdjltym\",\"applicationType\":\"MsixApplication\",\"commandLineSetting\":\"DoNotAllow\",\"commandLineArguments\":\"ihywartspph\",\"showInPortal\":true,\"iconPath\":\"ykxdssjpemmuc\",\"iconIndex\":115970163,\"iconHash\":\"kkflrmymyincqlhr\"},\"id\":\"wslmiiiovgqcg\",\"name\":\"uugqk\",\"type\":\"totiowlxteqdptjg\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -65,18 +65,18 @@ public void testList() throws Exception { PagedIterable response = manager .applications() - .list("atjeaahh", "jhhn", 919840845, false, 1060180082, com.azure.core.util.Context.NONE); + .list("zujksrlsmdes", "plpvm", 536619974, true, 1460091990, com.azure.core.util.Context.NONE); - Assertions.assertEquals("xkyxvxevblbj", response.iterator().next().description()); - Assertions.assertEquals("nljlageuaulx", response.iterator().next().friendlyName()); - Assertions.assertEquals("smjbnkppxyn", response.iterator().next().filePath()); - Assertions.assertEquals("lsvxeizz", response.iterator().next().msixPackageFamilyName()); - Assertions.assertEquals("klnsrmffey", response.iterator().next().msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.IN_BUILT, response.iterator().next().applicationType()); - Assertions.assertEquals(CommandLineSetting.REQUIRE, response.iterator().next().commandLineSetting()); - Assertions.assertEquals("piymerteea", response.iterator().next().commandLineArguments()); + Assertions.assertEquals("owx", response.iterator().next().description()); + Assertions.assertEquals("piudeugfsxzecpa", response.iterator().next().friendlyName()); + Assertions.assertEquals("kufykhvu", response.iterator().next().filePath()); + Assertions.assertEquals("epmrut", response.iterator().next().msixPackageFamilyName()); + Assertions.assertEquals("abaobnslujdjltym", response.iterator().next().msixPackageApplicationId()); + Assertions.assertEquals(RemoteApplicationType.MSIX_APPLICATION, response.iterator().next().applicationType()); + Assertions.assertEquals(CommandLineSetting.DO_NOT_ALLOW, response.iterator().next().commandLineSetting()); + Assertions.assertEquals("ihywartspph", response.iterator().next().commandLineArguments()); Assertions.assertEquals(true, response.iterator().next().showInPortal()); - Assertions.assertEquals("iekkkzddrtkgdojb", response.iterator().next().iconPath()); - Assertions.assertEquals(494588403, response.iterator().next().iconIndex()); + Assertions.assertEquals("ykxdssjpemmuc", response.iterator().next().iconPath()); + Assertions.assertEquals(115970163, response.iterator().next().iconIndex()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopInnerTests.java index ac3593868df6..37514c55707f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopInnerTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopInnerTests.java @@ -14,17 +14,17 @@ public void testDeserialize() throws Exception { DesktopInner model = BinaryData .fromString( - "{\"properties\":{\"objectId\":\"qig\",\"description\":\"duhavhqlkt\",\"friendlyName\":\"maqolbgycduie\",\"iconHash\":\"gccymvaolpssl\"},\"id\":\"fmmdnbbg\",\"name\":\"zpswiydmc\",\"type\":\"yhz\"}") + "{\"properties\":{\"objectId\":\"fn\",\"description\":\"kwyfzqwhxxbuyqax\",\"friendlyName\":\"eqz\",\"iconHash\":\"priolx\"},\"id\":\"jaltolmnc\",\"name\":\"sobqw\",\"type\":\"sdbnwdcfhucqdpf\"}") .toObject(DesktopInner.class); - Assertions.assertEquals("duhavhqlkt", model.description()); - Assertions.assertEquals("maqolbgycduie", model.friendlyName()); + Assertions.assertEquals("kwyfzqwhxxbuyqax", model.description()); + Assertions.assertEquals("eqz", model.friendlyName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DesktopInner model = new DesktopInner().withDescription("duhavhqlkt").withFriendlyName("maqolbgycduie"); + DesktopInner model = new DesktopInner().withDescription("kwyfzqwhxxbuyqax").withFriendlyName("eqz"); model = BinaryData.fromObject(model).toObject(DesktopInner.class); - Assertions.assertEquals("duhavhqlkt", model.description()); - Assertions.assertEquals("maqolbgycduie", model.friendlyName()); + Assertions.assertEquals("kwyfzqwhxxbuyqax", model.description()); + Assertions.assertEquals("eqz", model.friendlyName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopListTests.java index b9a0b8ee49fc..3fab48f41b23 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopListTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopListTests.java @@ -16,10 +16,10 @@ public void testDeserialize() throws Exception { DesktopList model = BinaryData .fromString( - "{\"value\":[{\"properties\":{\"objectId\":\"gureodkwobdag\",\"description\":\"ibqdxbxwakbogqx\",\"friendlyName\":\"lkzgxhuriplbp\",\"iconHash\":\"xunkbebxmubyynt\"},\"id\":\"rbqtkoie\",\"name\":\"seotgqrllt\",\"type\":\"u\"}],\"nextLink\":\"auwzizxbmpgc\"}") + "{\"value\":[{\"properties\":{\"objectId\":\"frvtpuqu\",\"description\":\"qlgkfbtn\",\"friendlyName\":\"aongbj\",\"iconHash\":\"tujitcjedft\"},\"id\":\"ae\",\"name\":\"kojvd\",\"type\":\"pzfoqoui\"},{\"properties\":{\"objectId\":\"arz\",\"description\":\"zuf\",\"friendlyName\":\"ciqopidoa\",\"iconHash\":\"iodhkhazxkhnz\"},\"id\":\"nlwntoe\",\"name\":\"okdwb\",\"type\":\"hksz\"}],\"nextLink\":\"mrv\"}") .toObject(DesktopList.class); - Assertions.assertEquals("ibqdxbxwakbogqx", model.value().get(0).description()); - Assertions.assertEquals("lkzgxhuriplbp", model.value().get(0).friendlyName()); + Assertions.assertEquals("qlgkfbtn", model.value().get(0).description()); + Assertions.assertEquals("aongbj", model.value().get(0).friendlyName()); } @org.junit.jupiter.api.Test @@ -29,9 +29,10 @@ public void testSerialize() throws Exception { .withValue( Arrays .asList( - new DesktopInner().withDescription("ibqdxbxwakbogqx").withFriendlyName("lkzgxhuriplbp"))); + new DesktopInner().withDescription("qlgkfbtn").withFriendlyName("aongbj"), + new DesktopInner().withDescription("zuf").withFriendlyName("ciqopidoa"))); model = BinaryData.fromObject(model).toObject(DesktopList.class); - Assertions.assertEquals("ibqdxbxwakbogqx", model.value().get(0).description()); - Assertions.assertEquals("lkzgxhuriplbp", model.value().get(0).friendlyName()); + Assertions.assertEquals("qlgkfbtn", model.value().get(0).description()); + Assertions.assertEquals("aongbj", model.value().get(0).friendlyName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchPropertiesTests.java index 337b01488894..d8fec0d48337 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchPropertiesTests.java @@ -13,18 +13,18 @@ public final class DesktopPatchPropertiesTests { public void testDeserialize() throws Exception { DesktopPatchProperties model = BinaryData - .fromString("{\"description\":\"ikvmkqzeqqk\",\"friendlyName\":\"tfz\"}") + .fromString("{\"description\":\"auwjuetaebu\",\"friendlyName\":\"vdmovsmzlxwabm\"}") .toObject(DesktopPatchProperties.class); - Assertions.assertEquals("ikvmkqzeqqk", model.description()); - Assertions.assertEquals("tfz", model.friendlyName()); + Assertions.assertEquals("auwjuetaebu", model.description()); + Assertions.assertEquals("vdmovsmzlxwabm", model.friendlyName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DesktopPatchProperties model = - new DesktopPatchProperties().withDescription("ikvmkqzeqqk").withFriendlyName("tfz"); + new DesktopPatchProperties().withDescription("auwjuetaebu").withFriendlyName("vdmovsmzlxwabm"); model = BinaryData.fromObject(model).toObject(DesktopPatchProperties.class); - Assertions.assertEquals("ikvmkqzeqqk", model.description()); - Assertions.assertEquals("tfz", model.friendlyName()); + Assertions.assertEquals("auwjuetaebu", model.description()); + Assertions.assertEquals("vdmovsmzlxwabm", model.friendlyName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchTests.java index 9ae646a0efdc..1e213caa4e75 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchTests.java @@ -16,35 +16,24 @@ public void testDeserialize() throws Exception { DesktopPatch model = BinaryData .fromString( - "{\"tags\":{\"erscdntne\":\"dzu\",\"tmweriofzpyq\":\"fiwjmygtdssls\",\"hhszh\":\"emwabnet\",\"lvwiwubmwmbesl\":\"d\"},\"properties\":{\"description\":\"wwtppj\",\"friendlyName\":\"cxogaokonzm\"}}") + "{\"tags\":{\"gdknnqv\":\"u\"},\"properties\":{\"description\":\"nqntorudsgsahm\",\"friendlyName\":\"c\"}}") .toObject(DesktopPatch.class); - Assertions.assertEquals("dzu", model.tags().get("erscdntne")); - Assertions.assertEquals("wwtppj", model.description()); - Assertions.assertEquals("cxogaokonzm", model.friendlyName()); + Assertions.assertEquals("u", model.tags().get("gdknnqv")); + Assertions.assertEquals("nqntorudsgsahm", model.description()); + Assertions.assertEquals("c", model.friendlyName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DesktopPatch model = - new DesktopPatch() - .withTags( - mapOf( - "erscdntne", - "dzu", - "tmweriofzpyq", - "fiwjmygtdssls", - "hhszh", - "emwabnet", - "lvwiwubmwmbesl", - "d")) - .withDescription("wwtppj") - .withFriendlyName("cxogaokonzm"); + new DesktopPatch().withTags(mapOf("gdknnqv", "u")).withDescription("nqntorudsgsahm").withFriendlyName("c"); model = BinaryData.fromObject(model).toObject(DesktopPatch.class); - Assertions.assertEquals("dzu", model.tags().get("erscdntne")); - Assertions.assertEquals("wwtppj", model.description()); - Assertions.assertEquals("cxogaokonzm", model.friendlyName()); + Assertions.assertEquals("u", model.tags().get("gdknnqv")); + Assertions.assertEquals("nqntorudsgsahm", model.description()); + Assertions.assertEquals("c", model.friendlyName()); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPropertiesTests.java index 62742f59b6d0..deff52079e46 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPropertiesTests.java @@ -14,18 +14,17 @@ public void testDeserialize() throws Exception { DesktopProperties model = BinaryData .fromString( - "{\"objectId\":\"ss\",\"description\":\"bzmnvdfznud\",\"friendlyName\":\"dvxzbncblylpst\",\"iconHash\":\"hh\"}") + "{\"objectId\":\"glsbjjc\",\"description\":\"vxb\",\"friendlyName\":\"vudutncor\",\"iconHash\":\"lxqtvcofudfl\"}") .toObject(DesktopProperties.class); - Assertions.assertEquals("bzmnvdfznud", model.description()); - Assertions.assertEquals("dvxzbncblylpst", model.friendlyName()); + Assertions.assertEquals("vxb", model.description()); + Assertions.assertEquals("vudutncor", model.friendlyName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DesktopProperties model = - new DesktopProperties().withDescription("bzmnvdfznud").withFriendlyName("dvxzbncblylpst"); + DesktopProperties model = new DesktopProperties().withDescription("vxb").withFriendlyName("vudutncor"); model = BinaryData.fromObject(model).toObject(DesktopProperties.class); - Assertions.assertEquals("bzmnvdfznud", model.description()); - Assertions.assertEquals("dvxzbncblylpst", model.friendlyName()); + Assertions.assertEquals("vxb", model.description()); + Assertions.assertEquals("vudutncor", model.friendlyName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetWithResponseMockTests.java index cb289ab356cd..6ac6810bba06 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetWithResponseMockTests.java @@ -31,7 +31,7 @@ public void testGetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"objectId\":\"iqtgdqoh\",\"description\":\"wsldrizetpwbr\",\"friendlyName\":\"llibphbqzmizak\",\"iconHash\":\"ankjpdnjzh\"},\"id\":\"oylhjlmuoyxprimr\",\"name\":\"opteecj\",\"type\":\"eislstvasylwx\"}"; + "{\"properties\":{\"objectId\":\"hdrwjjkh\",\"description\":\"omacluzvxnqmhr\",\"friendlyName\":\"pd\",\"iconHash\":\"mkoisqcssf\"},\"id\":\"uifmc\",\"name\":\"ypobkdqzr\",\"type\":\"zsylollgt\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -62,10 +62,10 @@ public void testGetWithResponse() throws Exception { Desktop response = manager .desktops() - .getWithResponse("eafidltugsresm", "ssjhoiftxfkf", "egprhptil", com.azure.core.util.Context.NONE) + .getWithResponse("bta", "ypnyghshxc", "lhkgmnsghp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wsldrizetpwbr", response.description()); - Assertions.assertEquals("llibphbqzmizak", response.friendlyName()); + Assertions.assertEquals("omacluzvxnqmhr", response.description()); + Assertions.assertEquals("pd", response.friendlyName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListMockTests.java index b22a74cb22b1..b0e9e640b645 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListMockTests.java @@ -32,7 +32,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"properties\":{\"objectId\":\"khgn\",\"description\":\"zonzlrpiqywnc\",\"friendlyName\":\"tszcofizehtdhgb\",\"iconHash\":\"vreljea\"},\"id\":\"rvzmlovuana\",\"name\":\"hcxlpm\",\"type\":\"erbdk\"}]}"; + "{\"value\":[{\"properties\":{\"objectId\":\"xigdhxiidlope\",\"description\":\"wdpyq\",\"friendlyName\":\"bxubmdna\",\"iconHash\":\"bqwremjela\"},\"id\":\"cigeleohdbvqvw\",\"name\":\"kjopwbeon\",\"type\":\"lkwzdqybxceakxcp\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -61,11 +61,9 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = - manager - .desktops() - .list("hcz", "xrxzbujrtr", 1272649211, true, 1247179302, com.azure.core.util.Context.NONE); + manager.desktops().list("yrrueqth", "mg", 1745918799, false, 1620223491, com.azure.core.util.Context.NONE); - Assertions.assertEquals("zonzlrpiqywnc", response.iterator().next().description()); - Assertions.assertEquals("tszcofizehtdhgb", response.iterator().next().friendlyName()); + Assertions.assertEquals("wdpyq", response.iterator().next().description()); + Assertions.assertEquals("bxubmdna", response.iterator().next().friendlyName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateWithResponseMockTests.java index c1f1b8ca59da..46afcc0534d9 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateWithResponseMockTests.java @@ -34,7 +34,7 @@ public void testUpdateWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"objectId\":\"bpmzzn\",\"description\":\"ff\",\"friendlyName\":\"qitmhheioqaqhv\",\"iconHash\":\"ufuqyrx\"},\"id\":\"lcgqlsismj\",\"name\":\"frddgamquhiosrsj\",\"type\":\"ivfcdisyirnx\"}"; + "{\"properties\":{\"objectId\":\"xihspnxwq\",\"description\":\"nepzwakls\",\"friendlyName\":\"bqqqagwwrxa\",\"iconHash\":\"zisglrrczezkhh\"},\"id\":\"njad\",\"name\":\"qoawjqoy\",\"type\":\"eayfbpcmspl\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -66,21 +66,21 @@ public void testUpdateWithResponse() throws Exception { manager .desktops() .updateWithResponse( - "zaum", - "eoohguufuzboyj", - "thwtzol", + "czzydmxzjij", + "vuaurk", + "hci", new DesktopPatch() - .withTags( - mapOf("lxveabfqx", "mwmdxmebwjscjpa", "ijddtvqc", "mwmqtibx", "jaeukmrsieekpn", "tad")) - .withDescription("apm") - .withFriendlyName("qmeqwigpibudqwyx"), + .withTags(mapOf("ja", "efxrdcoxnbk", "qltgrd", "urnnqbnqbpiz")) + .withDescription("pxrxvbfihwu") + .withFriendlyName("ctafsrbxrblm"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ff", response.description()); - Assertions.assertEquals("qitmhheioqaqhv", response.friendlyName()); + Assertions.assertEquals("nepzwakls", response.description()); + Assertions.assertEquals("bqqqagwwrxa", response.friendlyName()); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageInnerTests.java index 3f6e10861d4d..4154411b7b12 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageInnerTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageInnerTests.java @@ -18,99 +18,91 @@ public void testDeserialize() throws Exception { ExpandMsixImageInner model = BinaryData .fromString( - "{\"properties\":{\"packageAlias\":\"gzpfrla\",\"imagePath\":\"zrnw\",\"packageName\":\"indfpwpjyl\",\"packageFamilyName\":\"tlhflsjcdhszf\",\"packageFullName\":\"fbgofeljagrqmqh\",\"displayName\":\"vriiio\",\"packageRelativePath\":\"al\",\"isRegularRegistration\":false,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"ex\",\"publisher\":\"wueluqhhahhxv\",\"minVersion\":\"mzkwpjg\"},{\"dependencyName\":\"spughftqsxhq\",\"publisher\":\"j\",\"minVersion\":\"kndxdigrjgu\"},{\"dependencyName\":\"zdmsyqtfi\",\"publisher\":\"hbotzingamvppho\",\"minVersion\":\"qzudphq\"}],\"version\":\"vdkfwynwcvtbvk\",\"lastUpdated\":\"2021-01-08T18:46:20Z\",\"packageApplications\":[{\"appId\":\"vyqia\",\"description\":\"zwpcnpwzcjaesg\",\"appUserModelID\":\"sccyajguqf\",\"friendlyName\":\"ygz\",\"iconImageName\":\"dnkfx\"},{\"appId\":\"dwzrmuh\",\"description\":\"fcqdpsq\",\"appUserModelID\":\"vpsvuoymgcce\",\"friendlyName\":\"ezrypql\",\"iconImageName\":\"eokerqwkyhkobopg\"},{\"appId\":\"owepbqpcrfkb\",\"description\":\"csnjvcdwxlpqekft\",\"appUserModelID\":\"htjsying\",\"friendlyName\":\"qatmtdhtmdvy\",\"iconImageName\":\"ikdgszywkbir\"}]},\"id\":\"zh\",\"name\":\"hkjoqr\",\"type\":\"qqaatjinrvgou\"}") + "{\"properties\":{\"packageAlias\":\"fgiagtcojocqwo\",\"imagePath\":\"nzjvusfzldm\",\"packageName\":\"uxylfsbtkadpy\",\"packageFamilyName\":\"wn\",\"packageFullName\":\"gkbugrjqct\",\"displayName\":\"cmisofie\",\"packageRelativePath\":\"efojyqdhcupl\",\"isRegularRegistration\":true,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"hihlhzdsqtzbs\",\"publisher\":\"nowc\",\"minVersion\":\"fgmvecactxmwo\"},{\"dependencyName\":\"yowc\",\"publisher\":\"qovekqvgqou\",\"minVersion\":\"fzmpjwyivq\"},{\"dependencyName\":\"f\",\"publisher\":\"vhrfsphuagrt\",\"minVersion\":\"kteusqczk\"},{\"dependencyName\":\"klxubyja\",\"publisher\":\"mmfblcqcuubgqib\",\"minVersion\":\"a\"}],\"version\":\"etttwgdslqxihhr\",\"lastUpdated\":\"2021-07-10T01:42:44Z\",\"packageApplications\":[{\"appId\":\"seypxiutcxapz\",\"description\":\"rpetogebjoxsl\",\"appUserModelID\":\"nhl\",\"friendlyName\":\"rqnkkzjcjbtr\",\"iconImageName\":\"ehvvib\"}]},\"id\":\"jsto\",\"name\":\"beitpkx\",\"type\":\"tmo\"}") .toObject(ExpandMsixImageInner.class); - Assertions.assertEquals("gzpfrla", model.packageAlias()); - Assertions.assertEquals("zrnw", model.imagePath()); - Assertions.assertEquals("indfpwpjyl", model.packageName()); - Assertions.assertEquals("tlhflsjcdhszf", model.packageFamilyName()); - Assertions.assertEquals("fbgofeljagrqmqh", model.packageFullName()); - Assertions.assertEquals("vriiio", model.displayName()); - Assertions.assertEquals("al", model.packageRelativePath()); - Assertions.assertEquals(false, model.isRegularRegistration()); + Assertions.assertEquals("fgiagtcojocqwo", model.packageAlias()); + Assertions.assertEquals("nzjvusfzldm", model.imagePath()); + Assertions.assertEquals("uxylfsbtkadpy", model.packageName()); + Assertions.assertEquals("wn", model.packageFamilyName()); + Assertions.assertEquals("gkbugrjqct", model.packageFullName()); + Assertions.assertEquals("cmisofie", model.displayName()); + Assertions.assertEquals("efojyqdhcupl", model.packageRelativePath()); + Assertions.assertEquals(true, model.isRegularRegistration()); Assertions.assertEquals(true, model.isActive()); - Assertions.assertEquals("ex", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("wueluqhhahhxv", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("mzkwpjg", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("vdkfwynwcvtbvk", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-08T18:46:20Z"), model.lastUpdated()); - Assertions.assertEquals("vyqia", model.packageApplications().get(0).appId()); - Assertions.assertEquals("zwpcnpwzcjaesg", model.packageApplications().get(0).description()); - Assertions.assertEquals("sccyajguqf", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("ygz", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("dnkfx", model.packageApplications().get(0).iconImageName()); + Assertions.assertEquals("hihlhzdsqtzbs", model.packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("nowc", model.packageDependencies().get(0).publisher()); + Assertions.assertEquals("fgmvecactxmwo", model.packageDependencies().get(0).minVersion()); + Assertions.assertEquals("etttwgdslqxihhr", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-10T01:42:44Z"), model.lastUpdated()); + Assertions.assertEquals("seypxiutcxapz", model.packageApplications().get(0).appId()); + Assertions.assertEquals("rpetogebjoxsl", model.packageApplications().get(0).description()); + Assertions.assertEquals("nhl", model.packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("rqnkkzjcjbtr", model.packageApplications().get(0).friendlyName()); + Assertions.assertEquals("ehvvib", model.packageApplications().get(0).iconImageName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExpandMsixImageInner model = new ExpandMsixImageInner() - .withPackageAlias("gzpfrla") - .withImagePath("zrnw") - .withPackageName("indfpwpjyl") - .withPackageFamilyName("tlhflsjcdhszf") - .withPackageFullName("fbgofeljagrqmqh") - .withDisplayName("vriiio") - .withPackageRelativePath("al") - .withIsRegularRegistration(false) + .withPackageAlias("fgiagtcojocqwo") + .withImagePath("nzjvusfzldm") + .withPackageName("uxylfsbtkadpy") + .withPackageFamilyName("wn") + .withPackageFullName("gkbugrjqct") + .withDisplayName("cmisofie") + .withPackageRelativePath("efojyqdhcupl") + .withIsRegularRegistration(true) .withIsActive(true) .withPackageDependencies( Arrays .asList( new MsixPackageDependencies() - .withDependencyName("ex") - .withPublisher("wueluqhhahhxv") - .withMinVersion("mzkwpjg"), + .withDependencyName("hihlhzdsqtzbs") + .withPublisher("nowc") + .withMinVersion("fgmvecactxmwo"), new MsixPackageDependencies() - .withDependencyName("spughftqsxhq") - .withPublisher("j") - .withMinVersion("kndxdigrjgu"), + .withDependencyName("yowc") + .withPublisher("qovekqvgqou") + .withMinVersion("fzmpjwyivq"), new MsixPackageDependencies() - .withDependencyName("zdmsyqtfi") - .withPublisher("hbotzingamvppho") - .withMinVersion("qzudphq"))) - .withVersion("vdkfwynwcvtbvk") - .withLastUpdated(OffsetDateTime.parse("2021-01-08T18:46:20Z")) + .withDependencyName("f") + .withPublisher("vhrfsphuagrt") + .withMinVersion("kteusqczk"), + new MsixPackageDependencies() + .withDependencyName("klxubyja") + .withPublisher("mmfblcqcuubgqib") + .withMinVersion("a"))) + .withVersion("etttwgdslqxihhr") + .withLastUpdated(OffsetDateTime.parse("2021-07-10T01:42:44Z")) .withPackageApplications( Arrays .asList( new MsixPackageApplications() - .withAppId("vyqia") - .withDescription("zwpcnpwzcjaesg") - .withAppUserModelId("sccyajguqf") - .withFriendlyName("ygz") - .withIconImageName("dnkfx"), - new MsixPackageApplications() - .withAppId("dwzrmuh") - .withDescription("fcqdpsq") - .withAppUserModelId("vpsvuoymgcce") - .withFriendlyName("ezrypql") - .withIconImageName("eokerqwkyhkobopg"), - new MsixPackageApplications() - .withAppId("owepbqpcrfkb") - .withDescription("csnjvcdwxlpqekft") - .withAppUserModelId("htjsying") - .withFriendlyName("qatmtdhtmdvy") - .withIconImageName("ikdgszywkbir"))); + .withAppId("seypxiutcxapz") + .withDescription("rpetogebjoxsl") + .withAppUserModelId("nhl") + .withFriendlyName("rqnkkzjcjbtr") + .withIconImageName("ehvvib"))); model = BinaryData.fromObject(model).toObject(ExpandMsixImageInner.class); - Assertions.assertEquals("gzpfrla", model.packageAlias()); - Assertions.assertEquals("zrnw", model.imagePath()); - Assertions.assertEquals("indfpwpjyl", model.packageName()); - Assertions.assertEquals("tlhflsjcdhszf", model.packageFamilyName()); - Assertions.assertEquals("fbgofeljagrqmqh", model.packageFullName()); - Assertions.assertEquals("vriiio", model.displayName()); - Assertions.assertEquals("al", model.packageRelativePath()); - Assertions.assertEquals(false, model.isRegularRegistration()); + Assertions.assertEquals("fgiagtcojocqwo", model.packageAlias()); + Assertions.assertEquals("nzjvusfzldm", model.imagePath()); + Assertions.assertEquals("uxylfsbtkadpy", model.packageName()); + Assertions.assertEquals("wn", model.packageFamilyName()); + Assertions.assertEquals("gkbugrjqct", model.packageFullName()); + Assertions.assertEquals("cmisofie", model.displayName()); + Assertions.assertEquals("efojyqdhcupl", model.packageRelativePath()); + Assertions.assertEquals(true, model.isRegularRegistration()); Assertions.assertEquals(true, model.isActive()); - Assertions.assertEquals("ex", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("wueluqhhahhxv", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("mzkwpjg", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("vdkfwynwcvtbvk", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-08T18:46:20Z"), model.lastUpdated()); - Assertions.assertEquals("vyqia", model.packageApplications().get(0).appId()); - Assertions.assertEquals("zwpcnpwzcjaesg", model.packageApplications().get(0).description()); - Assertions.assertEquals("sccyajguqf", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("ygz", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("dnkfx", model.packageApplications().get(0).iconImageName()); + Assertions.assertEquals("hihlhzdsqtzbs", model.packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("nowc", model.packageDependencies().get(0).publisher()); + Assertions.assertEquals("fgmvecactxmwo", model.packageDependencies().get(0).minVersion()); + Assertions.assertEquals("etttwgdslqxihhr", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-10T01:42:44Z"), model.lastUpdated()); + Assertions.assertEquals("seypxiutcxapz", model.packageApplications().get(0).appId()); + Assertions.assertEquals("rpetogebjoxsl", model.packageApplications().get(0).description()); + Assertions.assertEquals("nhl", model.packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("rqnkkzjcjbtr", model.packageApplications().get(0).friendlyName()); + Assertions.assertEquals("ehvvib", model.packageApplications().get(0).iconImageName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageListTests.java index 678cea729932..7bc66860f835 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageListTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageListTests.java @@ -7,6 +7,8 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.ExpandMsixImageInner; import com.azure.resourcemanager.desktopvirtualization.models.ExpandMsixImageList; +import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; +import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies; import java.time.OffsetDateTime; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -17,19 +19,27 @@ public void testDeserialize() throws Exception { ExpandMsixImageList model = BinaryData .fromString( - "{\"value\":[{\"properties\":{\"packageAlias\":\"dbodacizsjqlhkrr\",\"imagePath\":\"deibqip\",\"packageName\":\"ghvxndzwmkrefa\",\"packageFamilyName\":\"jorwkqnyhgbij\",\"packageFullName\":\"ivfxzsjabibsyst\",\"displayName\":\"fsdjpvkvp\",\"packageRelativePath\":\"xbkzbzkdvncj\",\"isRegularRegistration\":true,\"isActive\":true,\"packageDependencies\":[],\"version\":\"kakmokzh\",\"lastUpdated\":\"2021-06-24T09:54:49Z\",\"packageApplications\":[]},\"id\":\"ffhmouwqlgzr\",\"name\":\"zeeyebi\",\"type\":\"ikayuhqlbjbsybb\"},{\"properties\":{\"packageAlias\":\"vtldgmfpgvmpip\",\"imagePath\":\"ltha\",\"packageName\":\"x\",\"packageFamilyName\":\"mwutwbdsre\",\"packageFullName\":\"drhneuyow\",\"displayName\":\"d\",\"packageRelativePath\":\"t\",\"isRegularRegistration\":false,\"isActive\":true,\"packageDependencies\":[],\"version\":\"gpikpzimejza\",\"lastUpdated\":\"2021-08-16T12:50:07Z\",\"packageApplications\":[]},\"id\":\"xi\",\"name\":\"vrmbzono\",\"type\":\"i\"}],\"nextLink\":\"jq\"}") + "{\"value\":[{\"properties\":{\"packageAlias\":\"ivsiy\",\"imagePath\":\"kdncj\",\"packageName\":\"onbzoggculapzwy\",\"packageFamilyName\":\"gogtqxepnylbf\",\"packageFullName\":\"jlyjtlvofq\",\"displayName\":\"vfcibyfmowux\",\"packageRelativePath\":\"jpvd\",\"isRegularRegistration\":true,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"wzjbh\",\"publisher\":\"sxjrk\",\"minVersion\":\"btrnegvm\"},{\"dependencyName\":\"uqeqv\",\"publisher\":\"spastjbkkdmf\",\"minVersion\":\"est\"},{\"dependencyName\":\"lx\",\"publisher\":\"ilozapeewchpxlk\",\"minVersion\":\"kuziycsle\"}],\"version\":\"f\",\"lastUpdated\":\"2021-03-03T22:41:41Z\",\"packageApplications\":[{\"appId\":\"yhjtqedcgzu\",\"description\":\"mmrqz\",\"appUserModelID\":\"rjvpglydzgkrvqee\",\"friendlyName\":\"oepry\",\"iconImageName\":\"nwy\"},{\"appId\":\"mov\",\"description\":\"fvaawzqa\",\"appUserModelID\":\"lgzurig\",\"friendlyName\":\"ecxn\",\"iconImageName\":\"icokpv\"}]},\"id\":\"qtmldgxo\",\"name\":\"firclnpkciayz\",\"type\":\"iykhy\"},{\"properties\":{\"packageAlias\":\"vjlboxqvk\",\"imagePath\":\"mxho\",\"packageName\":\"ynhdwdigum\",\"packageFamilyName\":\"raauzzpt\",\"packageFullName\":\"zysdzh\",\"displayName\":\"wwvaiqyuvvfonk\",\"packageRelativePath\":\"hqyikvy\",\"isRegularRegistration\":false,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"wmn\",\"publisher\":\"ttijfybvpoekrs\",\"minVersion\":\"gbdhuzqgnjdg\"},{\"dependencyName\":\"nscliqhzvhxnk\",\"publisher\":\"tkubotppn\",\"minVersion\":\"xz\"}],\"version\":\"ihfrbbcevqa\",\"lastUpdated\":\"2021-01-25T14:16:29Z\",\"packageApplications\":[{\"appId\":\"lfkqojpy\",\"description\":\"gtrd\",\"appUserModelID\":\"ifmzzsd\",\"friendlyName\":\"brn\",\"iconImageName\":\"u\"},{\"appId\":\"a\",\"description\":\"g\",\"appUserModelID\":\"hocxvdfffwafqrou\",\"friendlyName\":\"spave\",\"iconImageName\":\"r\"},{\"appId\":\"n\",\"description\":\"zudhcxg\",\"appUserModelID\":\"oyxcdyuib\",\"friendlyName\":\"fdn\",\"iconImageName\":\"ydvfvfcjnae\"},{\"appId\":\"vhmgorffukis\",\"description\":\"w\",\"appUserModelID\":\"hwplefaxvx\",\"friendlyName\":\"cbtgnhnz\",\"iconImageName\":\"qxtjjfzqlqhyca\"}]},\"id\":\"ggxdb\",\"name\":\"esmi\",\"type\":\"knlrariaawiuagy\"}],\"nextLink\":\"qfby\"}") .toObject(ExpandMsixImageList.class); - Assertions.assertEquals("dbodacizsjqlhkrr", model.value().get(0).packageAlias()); - Assertions.assertEquals("deibqip", model.value().get(0).imagePath()); - Assertions.assertEquals("ghvxndzwmkrefa", model.value().get(0).packageName()); - Assertions.assertEquals("jorwkqnyhgbij", model.value().get(0).packageFamilyName()); - Assertions.assertEquals("ivfxzsjabibsyst", model.value().get(0).packageFullName()); - Assertions.assertEquals("fsdjpvkvp", model.value().get(0).displayName()); - Assertions.assertEquals("xbkzbzkdvncj", model.value().get(0).packageRelativePath()); + Assertions.assertEquals("ivsiy", model.value().get(0).packageAlias()); + Assertions.assertEquals("kdncj", model.value().get(0).imagePath()); + Assertions.assertEquals("onbzoggculapzwy", model.value().get(0).packageName()); + Assertions.assertEquals("gogtqxepnylbf", model.value().get(0).packageFamilyName()); + Assertions.assertEquals("jlyjtlvofq", model.value().get(0).packageFullName()); + Assertions.assertEquals("vfcibyfmowux", model.value().get(0).displayName()); + Assertions.assertEquals("jpvd", model.value().get(0).packageRelativePath()); Assertions.assertEquals(true, model.value().get(0).isRegularRegistration()); Assertions.assertEquals(true, model.value().get(0).isActive()); - Assertions.assertEquals("kakmokzh", model.value().get(0).version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-24T09:54:49Z"), model.value().get(0).lastUpdated()); + Assertions.assertEquals("wzjbh", model.value().get(0).packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("sxjrk", model.value().get(0).packageDependencies().get(0).publisher()); + Assertions.assertEquals("btrnegvm", model.value().get(0).packageDependencies().get(0).minVersion()); + Assertions.assertEquals("f", model.value().get(0).version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-03T22:41:41Z"), model.value().get(0).lastUpdated()); + Assertions.assertEquals("yhjtqedcgzu", model.value().get(0).packageApplications().get(0).appId()); + Assertions.assertEquals("mmrqz", model.value().get(0).packageApplications().get(0).description()); + Assertions.assertEquals("rjvpglydzgkrvqee", model.value().get(0).packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("oepry", model.value().get(0).packageApplications().get(0).friendlyName()); + Assertions.assertEquals("nwy", model.value().get(0).packageApplications().get(0).iconImageName()); } @org.junit.jupiter.api.Test @@ -40,44 +50,116 @@ public void testSerialize() throws Exception { Arrays .asList( new ExpandMsixImageInner() - .withPackageAlias("dbodacizsjqlhkrr") - .withImagePath("deibqip") - .withPackageName("ghvxndzwmkrefa") - .withPackageFamilyName("jorwkqnyhgbij") - .withPackageFullName("ivfxzsjabibsyst") - .withDisplayName("fsdjpvkvp") - .withPackageRelativePath("xbkzbzkdvncj") + .withPackageAlias("ivsiy") + .withImagePath("kdncj") + .withPackageName("onbzoggculapzwy") + .withPackageFamilyName("gogtqxepnylbf") + .withPackageFullName("jlyjtlvofq") + .withDisplayName("vfcibyfmowux") + .withPackageRelativePath("jpvd") .withIsRegularRegistration(true) .withIsActive(true) - .withPackageDependencies(Arrays.asList()) - .withVersion("kakmokzh") - .withLastUpdated(OffsetDateTime.parse("2021-06-24T09:54:49Z")) - .withPackageApplications(Arrays.asList()), + .withPackageDependencies( + Arrays + .asList( + new MsixPackageDependencies() + .withDependencyName("wzjbh") + .withPublisher("sxjrk") + .withMinVersion("btrnegvm"), + new MsixPackageDependencies() + .withDependencyName("uqeqv") + .withPublisher("spastjbkkdmf") + .withMinVersion("est"), + new MsixPackageDependencies() + .withDependencyName("lx") + .withPublisher("ilozapeewchpxlk") + .withMinVersion("kuziycsle"))) + .withVersion("f") + .withLastUpdated(OffsetDateTime.parse("2021-03-03T22:41:41Z")) + .withPackageApplications( + Arrays + .asList( + new MsixPackageApplications() + .withAppId("yhjtqedcgzu") + .withDescription("mmrqz") + .withAppUserModelId("rjvpglydzgkrvqee") + .withFriendlyName("oepry") + .withIconImageName("nwy"), + new MsixPackageApplications() + .withAppId("mov") + .withDescription("fvaawzqa") + .withAppUserModelId("lgzurig") + .withFriendlyName("ecxn") + .withIconImageName("icokpv"))), new ExpandMsixImageInner() - .withPackageAlias("vtldgmfpgvmpip") - .withImagePath("ltha") - .withPackageName("x") - .withPackageFamilyName("mwutwbdsre") - .withPackageFullName("drhneuyow") - .withDisplayName("d") - .withPackageRelativePath("t") + .withPackageAlias("vjlboxqvk") + .withImagePath("mxho") + .withPackageName("ynhdwdigum") + .withPackageFamilyName("raauzzpt") + .withPackageFullName("zysdzh") + .withDisplayName("wwvaiqyuvvfonk") + .withPackageRelativePath("hqyikvy") .withIsRegularRegistration(false) .withIsActive(true) - .withPackageDependencies(Arrays.asList()) - .withVersion("gpikpzimejza") - .withLastUpdated(OffsetDateTime.parse("2021-08-16T12:50:07Z")) - .withPackageApplications(Arrays.asList()))); + .withPackageDependencies( + Arrays + .asList( + new MsixPackageDependencies() + .withDependencyName("wmn") + .withPublisher("ttijfybvpoekrs") + .withMinVersion("gbdhuzqgnjdg"), + new MsixPackageDependencies() + .withDependencyName("nscliqhzvhxnk") + .withPublisher("tkubotppn") + .withMinVersion("xz"))) + .withVersion("ihfrbbcevqa") + .withLastUpdated(OffsetDateTime.parse("2021-01-25T14:16:29Z")) + .withPackageApplications( + Arrays + .asList( + new MsixPackageApplications() + .withAppId("lfkqojpy") + .withDescription("gtrd") + .withAppUserModelId("ifmzzsd") + .withFriendlyName("brn") + .withIconImageName("u"), + new MsixPackageApplications() + .withAppId("a") + .withDescription("g") + .withAppUserModelId("hocxvdfffwafqrou") + .withFriendlyName("spave") + .withIconImageName("r"), + new MsixPackageApplications() + .withAppId("n") + .withDescription("zudhcxg") + .withAppUserModelId("oyxcdyuib") + .withFriendlyName("fdn") + .withIconImageName("ydvfvfcjnae"), + new MsixPackageApplications() + .withAppId("vhmgorffukis") + .withDescription("w") + .withAppUserModelId("hwplefaxvx") + .withFriendlyName("cbtgnhnz") + .withIconImageName("qxtjjfzqlqhyca"))))); model = BinaryData.fromObject(model).toObject(ExpandMsixImageList.class); - Assertions.assertEquals("dbodacizsjqlhkrr", model.value().get(0).packageAlias()); - Assertions.assertEquals("deibqip", model.value().get(0).imagePath()); - Assertions.assertEquals("ghvxndzwmkrefa", model.value().get(0).packageName()); - Assertions.assertEquals("jorwkqnyhgbij", model.value().get(0).packageFamilyName()); - Assertions.assertEquals("ivfxzsjabibsyst", model.value().get(0).packageFullName()); - Assertions.assertEquals("fsdjpvkvp", model.value().get(0).displayName()); - Assertions.assertEquals("xbkzbzkdvncj", model.value().get(0).packageRelativePath()); + Assertions.assertEquals("ivsiy", model.value().get(0).packageAlias()); + Assertions.assertEquals("kdncj", model.value().get(0).imagePath()); + Assertions.assertEquals("onbzoggculapzwy", model.value().get(0).packageName()); + Assertions.assertEquals("gogtqxepnylbf", model.value().get(0).packageFamilyName()); + Assertions.assertEquals("jlyjtlvofq", model.value().get(0).packageFullName()); + Assertions.assertEquals("vfcibyfmowux", model.value().get(0).displayName()); + Assertions.assertEquals("jpvd", model.value().get(0).packageRelativePath()); Assertions.assertEquals(true, model.value().get(0).isRegularRegistration()); Assertions.assertEquals(true, model.value().get(0).isActive()); - Assertions.assertEquals("kakmokzh", model.value().get(0).version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-24T09:54:49Z"), model.value().get(0).lastUpdated()); + Assertions.assertEquals("wzjbh", model.value().get(0).packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("sxjrk", model.value().get(0).packageDependencies().get(0).publisher()); + Assertions.assertEquals("btrnegvm", model.value().get(0).packageDependencies().get(0).minVersion()); + Assertions.assertEquals("f", model.value().get(0).version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-03T22:41:41Z"), model.value().get(0).lastUpdated()); + Assertions.assertEquals("yhjtqedcgzu", model.value().get(0).packageApplications().get(0).appId()); + Assertions.assertEquals("mmrqz", model.value().get(0).packageApplications().get(0).description()); + Assertions.assertEquals("rjvpglydzgkrvqee", model.value().get(0).packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("oepry", model.value().get(0).packageApplications().get(0).friendlyName()); + Assertions.assertEquals("nwy", model.value().get(0).packageApplications().get(0).iconImageName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImagePropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImagePropertiesTests.java index 2682a6662ef0..46cc8bb97e89 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImagePropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImagePropertiesTests.java @@ -18,93 +18,93 @@ public void testDeserialize() throws Exception { ExpandMsixImageProperties model = BinaryData .fromString( - "{\"packageAlias\":\"fiibfggjioolvr\",\"imagePath\":\"kvtkkg\",\"packageName\":\"qwjygvja\",\"packageFamilyName\":\"blmhvkzuhb\",\"packageFullName\":\"vyhgs\",\"displayName\":\"byrqufeg\",\"packageRelativePath\":\"vwz\",\"isRegularRegistration\":true,\"isActive\":false,\"packageDependencies\":[{\"dependencyName\":\"l\",\"publisher\":\"ngitvgbmhrixkwm\",\"minVersion\":\"jejveg\"},{\"dependencyName\":\"bpnaixexccbdre\",\"publisher\":\"hcexdrrvqa\",\"minVersion\":\"kghtpwijnh\"},{\"dependencyName\":\"svfycxzbfv\",\"publisher\":\"wvrvmtg\",\"minVersion\":\"ppyostronzmyhgf\"}],\"version\":\"nsxkmcwaekrrjr\",\"lastUpdated\":\"2021-03-26T11:48:46Z\",\"packageApplications\":[{\"appId\":\"gumhjglikkxws\",\"description\":\"lbqpvuzlmvfelf\",\"appUserModelID\":\"gplcrpwjxeznoigb\",\"friendlyName\":\"jwmwkpnbs\",\"iconImageName\":\"ejjoqkagfhsxtta\"},{\"appId\":\"nfaazpxdtnkdmkq\",\"description\":\"lwuenvrkp\",\"appUserModelID\":\"uaibrebqaaysj\",\"friendlyName\":\"xqtnq\",\"iconImageName\":\"ezl\"}]}") + "{\"packageAlias\":\"klf\",\"imagePath\":\"dgfcwqmp\",\"packageName\":\"aqxzhemjyho\",\"packageFamilyName\":\"jswtwkozzwc\",\"packageFullName\":\"kb\",\"displayName\":\"pfajnjwltlwtjj\",\"packageRelativePath\":\"ktalhsnvkcdmxz\",\"isRegularRegistration\":false,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"wiaaomylweaz\",\"publisher\":\"cse\",\"minVersion\":\"wwnpj\"},{\"dependencyName\":\"fz\",\"publisher\":\"pchwa\",\"minVersion\":\"bousn\"},{\"dependencyName\":\"pgfewetwlyx\",\"publisher\":\"cxy\",\"minVersion\":\"hdjhlimmbcx\"}],\"version\":\"bcporxvxcjzhqizx\",\"lastUpdated\":\"2021-11-25T06:23:01Z\",\"packageApplications\":[{\"appId\":\"scjavftju\",\"description\":\"qaz\",\"appUserModelID\":\"tgguwpijrajcivmm\",\"friendlyName\":\"f\",\"iconImageName\":\"iwrxgkn\"},{\"appId\":\"inzqodfvpgs\",\"description\":\"xgsg\",\"appUserModelID\":\"fgzdjtxvz\",\"friendlyName\":\"bqvgaqv\",\"iconImageName\":\"a\"}]}") .toObject(ExpandMsixImageProperties.class); - Assertions.assertEquals("fiibfggjioolvr", model.packageAlias()); - Assertions.assertEquals("kvtkkg", model.imagePath()); - Assertions.assertEquals("qwjygvja", model.packageName()); - Assertions.assertEquals("blmhvkzuhb", model.packageFamilyName()); - Assertions.assertEquals("vyhgs", model.packageFullName()); - Assertions.assertEquals("byrqufeg", model.displayName()); - Assertions.assertEquals("vwz", model.packageRelativePath()); - Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals("l", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("ngitvgbmhrixkwm", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("jejveg", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("nsxkmcwaekrrjr", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-26T11:48:46Z"), model.lastUpdated()); - Assertions.assertEquals("gumhjglikkxws", model.packageApplications().get(0).appId()); - Assertions.assertEquals("lbqpvuzlmvfelf", model.packageApplications().get(0).description()); - Assertions.assertEquals("gplcrpwjxeznoigb", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("jwmwkpnbs", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("ejjoqkagfhsxtta", model.packageApplications().get(0).iconImageName()); + Assertions.assertEquals("klf", model.packageAlias()); + Assertions.assertEquals("dgfcwqmp", model.imagePath()); + Assertions.assertEquals("aqxzhemjyho", model.packageName()); + Assertions.assertEquals("jswtwkozzwc", model.packageFamilyName()); + Assertions.assertEquals("kb", model.packageFullName()); + Assertions.assertEquals("pfajnjwltlwtjj", model.displayName()); + Assertions.assertEquals("ktalhsnvkcdmxz", model.packageRelativePath()); + Assertions.assertEquals(false, model.isRegularRegistration()); + Assertions.assertEquals(true, model.isActive()); + Assertions.assertEquals("wiaaomylweaz", model.packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("cse", model.packageDependencies().get(0).publisher()); + Assertions.assertEquals("wwnpj", model.packageDependencies().get(0).minVersion()); + Assertions.assertEquals("bcporxvxcjzhqizx", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-25T06:23:01Z"), model.lastUpdated()); + Assertions.assertEquals("scjavftju", model.packageApplications().get(0).appId()); + Assertions.assertEquals("qaz", model.packageApplications().get(0).description()); + Assertions.assertEquals("tgguwpijrajcivmm", model.packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("f", model.packageApplications().get(0).friendlyName()); + Assertions.assertEquals("iwrxgkn", model.packageApplications().get(0).iconImageName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ExpandMsixImageProperties model = new ExpandMsixImageProperties() - .withPackageAlias("fiibfggjioolvr") - .withImagePath("kvtkkg") - .withPackageName("qwjygvja") - .withPackageFamilyName("blmhvkzuhb") - .withPackageFullName("vyhgs") - .withDisplayName("byrqufeg") - .withPackageRelativePath("vwz") - .withIsRegularRegistration(true) - .withIsActive(false) + .withPackageAlias("klf") + .withImagePath("dgfcwqmp") + .withPackageName("aqxzhemjyho") + .withPackageFamilyName("jswtwkozzwc") + .withPackageFullName("kb") + .withDisplayName("pfajnjwltlwtjj") + .withPackageRelativePath("ktalhsnvkcdmxz") + .withIsRegularRegistration(false) + .withIsActive(true) .withPackageDependencies( Arrays .asList( new MsixPackageDependencies() - .withDependencyName("l") - .withPublisher("ngitvgbmhrixkwm") - .withMinVersion("jejveg"), + .withDependencyName("wiaaomylweaz") + .withPublisher("cse") + .withMinVersion("wwnpj"), new MsixPackageDependencies() - .withDependencyName("bpnaixexccbdre") - .withPublisher("hcexdrrvqa") - .withMinVersion("kghtpwijnh"), + .withDependencyName("fz") + .withPublisher("pchwa") + .withMinVersion("bousn"), new MsixPackageDependencies() - .withDependencyName("svfycxzbfv") - .withPublisher("wvrvmtg") - .withMinVersion("ppyostronzmyhgf"))) - .withVersion("nsxkmcwaekrrjr") - .withLastUpdated(OffsetDateTime.parse("2021-03-26T11:48:46Z")) + .withDependencyName("pgfewetwlyx") + .withPublisher("cxy") + .withMinVersion("hdjhlimmbcx"))) + .withVersion("bcporxvxcjzhqizx") + .withLastUpdated(OffsetDateTime.parse("2021-11-25T06:23:01Z")) .withPackageApplications( Arrays .asList( new MsixPackageApplications() - .withAppId("gumhjglikkxws") - .withDescription("lbqpvuzlmvfelf") - .withAppUserModelId("gplcrpwjxeznoigb") - .withFriendlyName("jwmwkpnbs") - .withIconImageName("ejjoqkagfhsxtta"), + .withAppId("scjavftju") + .withDescription("qaz") + .withAppUserModelId("tgguwpijrajcivmm") + .withFriendlyName("f") + .withIconImageName("iwrxgkn"), new MsixPackageApplications() - .withAppId("nfaazpxdtnkdmkq") - .withDescription("lwuenvrkp") - .withAppUserModelId("uaibrebqaaysj") - .withFriendlyName("xqtnq") - .withIconImageName("ezl"))); + .withAppId("inzqodfvpgs") + .withDescription("xgsg") + .withAppUserModelId("fgzdjtxvz") + .withFriendlyName("bqvgaqv") + .withIconImageName("a"))); model = BinaryData.fromObject(model).toObject(ExpandMsixImageProperties.class); - Assertions.assertEquals("fiibfggjioolvr", model.packageAlias()); - Assertions.assertEquals("kvtkkg", model.imagePath()); - Assertions.assertEquals("qwjygvja", model.packageName()); - Assertions.assertEquals("blmhvkzuhb", model.packageFamilyName()); - Assertions.assertEquals("vyhgs", model.packageFullName()); - Assertions.assertEquals("byrqufeg", model.displayName()); - Assertions.assertEquals("vwz", model.packageRelativePath()); - Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals("l", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("ngitvgbmhrixkwm", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("jejveg", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("nsxkmcwaekrrjr", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-26T11:48:46Z"), model.lastUpdated()); - Assertions.assertEquals("gumhjglikkxws", model.packageApplications().get(0).appId()); - Assertions.assertEquals("lbqpvuzlmvfelf", model.packageApplications().get(0).description()); - Assertions.assertEquals("gplcrpwjxeznoigb", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("jwmwkpnbs", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("ejjoqkagfhsxtta", model.packageApplications().get(0).iconImageName()); + Assertions.assertEquals("klf", model.packageAlias()); + Assertions.assertEquals("dgfcwqmp", model.imagePath()); + Assertions.assertEquals("aqxzhemjyho", model.packageName()); + Assertions.assertEquals("jswtwkozzwc", model.packageFamilyName()); + Assertions.assertEquals("kb", model.packageFullName()); + Assertions.assertEquals("pfajnjwltlwtjj", model.displayName()); + Assertions.assertEquals("ktalhsnvkcdmxz", model.packageRelativePath()); + Assertions.assertEquals(false, model.isRegularRegistration()); + Assertions.assertEquals(true, model.isActive()); + Assertions.assertEquals("wiaaomylweaz", model.packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("cse", model.packageDependencies().get(0).publisher()); + Assertions.assertEquals("wwnpj", model.packageDependencies().get(0).minVersion()); + Assertions.assertEquals("bcporxvxcjzhqizx", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-25T06:23:01Z"), model.lastUpdated()); + Assertions.assertEquals("scjavftju", model.packageApplications().get(0).appId()); + Assertions.assertEquals("qaz", model.packageApplications().get(0).description()); + Assertions.assertEquals("tgguwpijrajcivmm", model.packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("f", model.packageApplications().get(0).friendlyName()); + Assertions.assertEquals("iwrxgkn", model.packageApplications().get(0).iconImageName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteWithResponseMockTests.java index 3a794a58bd88..6177b05dd095 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteWithResponseMockTests.java @@ -56,8 +56,6 @@ public void testDeleteWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager - .hostPools() - .deleteWithResponse("belawumuaslzkwr", "woycqucwyha", true, com.azure.core.util.Context.NONE); + manager.hostPools().deleteWithResponse("houcqpqojxc", "zrzdcgd", true, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/IdentityTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/IdentityTests.java index 65f3dcaa6bed..1f1a86b7b845 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/IdentityTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/IdentityTests.java @@ -14,7 +14,7 @@ public final class IdentityTests { public void testDeserialize() throws Exception { Identity model = BinaryData - .fromString("{\"principalId\":\"w\",\"tenantId\":\"lryplwckbasyy\",\"type\":\"SystemAssigned\"}") + .fromString("{\"principalId\":\"zdn\",\"tenantId\":\"jq\",\"type\":\"SystemAssigned\"}") .toObject(Identity.class); Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/LogSpecificationTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/LogSpecificationTests.java index eed2ef4f6a66..4265503fd082 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/LogSpecificationTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/LogSpecificationTests.java @@ -13,24 +13,20 @@ public final class LogSpecificationTests { public void testDeserialize() throws Exception { LogSpecification model = BinaryData - .fromString( - "{\"name\":\"wmfdatscmdvpjhul\",\"displayName\":\"uvm\",\"blobDuration\":\"ozkrwfndiodjpslw\"}") + .fromString("{\"name\":\"ryhtnapczwlokjy\",\"displayName\":\"kkvnipjox\",\"blobDuration\":\"nchgej\"}") .toObject(LogSpecification.class); - Assertions.assertEquals("wmfdatscmdvpjhul", model.name()); - Assertions.assertEquals("uvm", model.displayName()); - Assertions.assertEquals("ozkrwfndiodjpslw", model.blobDuration()); + Assertions.assertEquals("ryhtnapczwlokjy", model.name()); + Assertions.assertEquals("kkvnipjox", model.displayName()); + Assertions.assertEquals("nchgej", model.blobDuration()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { LogSpecification model = - new LogSpecification() - .withName("wmfdatscmdvpjhul") - .withDisplayName("uvm") - .withBlobDuration("ozkrwfndiodjpslw"); + new LogSpecification().withName("ryhtnapczwlokjy").withDisplayName("kkvnipjox").withBlobDuration("nchgej"); model = BinaryData.fromObject(model).toObject(LogSpecification.class); - Assertions.assertEquals("wmfdatscmdvpjhul", model.name()); - Assertions.assertEquals("uvm", model.displayName()); - Assertions.assertEquals("ozkrwfndiodjpslw", model.blobDuration()); + Assertions.assertEquals("ryhtnapczwlokjy", model.name()); + Assertions.assertEquals("kkvnipjox", model.displayName()); + Assertions.assertEquals("nchgej", model.blobDuration()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPatchPropertiesTests.java index eae1f0f8ea01..c4347feabd38 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPatchPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPatchPropertiesTests.java @@ -14,18 +14,18 @@ public final class MaintenanceWindowPatchPropertiesTests { public void testDeserialize() throws Exception { MaintenanceWindowPatchProperties model = BinaryData - .fromString("{\"hour\":1586709440,\"dayOfWeek\":\"Tuesday\"}") + .fromString("{\"hour\":831606659,\"dayOfWeek\":\"Wednesday\"}") .toObject(MaintenanceWindowPatchProperties.class); - Assertions.assertEquals(1586709440, model.hour()); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.dayOfWeek()); + Assertions.assertEquals(831606659, model.hour()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.dayOfWeek()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MaintenanceWindowPatchProperties model = - new MaintenanceWindowPatchProperties().withHour(1586709440).withDayOfWeek(DayOfWeek.TUESDAY); + new MaintenanceWindowPatchProperties().withHour(831606659).withDayOfWeek(DayOfWeek.WEDNESDAY); model = BinaryData.fromObject(model).toObject(MaintenanceWindowPatchProperties.class); - Assertions.assertEquals(1586709440, model.hour()); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.dayOfWeek()); + Assertions.assertEquals(831606659, model.hour()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.dayOfWeek()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPropertiesTests.java index 8f3e49e8e82d..6b6eafe167ac 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPropertiesTests.java @@ -14,18 +14,18 @@ public final class MaintenanceWindowPropertiesTests { public void testDeserialize() throws Exception { MaintenanceWindowProperties model = BinaryData - .fromString("{\"hour\":1591764317,\"dayOfWeek\":\"Sunday\"}") + .fromString("{\"hour\":1689863270,\"dayOfWeek\":\"Wednesday\"}") .toObject(MaintenanceWindowProperties.class); - Assertions.assertEquals(1591764317, model.hour()); - Assertions.assertEquals(DayOfWeek.SUNDAY, model.dayOfWeek()); + Assertions.assertEquals(1689863270, model.hour()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.dayOfWeek()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MaintenanceWindowProperties model = - new MaintenanceWindowProperties().withHour(1591764317).withDayOfWeek(DayOfWeek.SUNDAY); + new MaintenanceWindowProperties().withHour(1689863270).withDayOfWeek(DayOfWeek.WEDNESDAY); model = BinaryData.fromObject(model).toObject(MaintenanceWindowProperties.class); - Assertions.assertEquals(1591764317, model.hour()); - Assertions.assertEquals(DayOfWeek.SUNDAY, model.dayOfWeek()); + Assertions.assertEquals(1689863270, model.hour()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.dayOfWeek()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImageUriTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImageUriTests.java index 52c9b7c768ab..00ac600b0706 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImageUriTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImageUriTests.java @@ -11,14 +11,14 @@ public final class MsixImageUriTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MsixImageUri model = BinaryData.fromString("{\"uri\":\"nyowxwlmdjrkvfg\"}").toObject(MsixImageUri.class); - Assertions.assertEquals("nyowxwlmdjrkvfg", model.uri()); + MsixImageUri model = BinaryData.fromString("{\"uri\":\"zb\"}").toObject(MsixImageUri.class); + Assertions.assertEquals("zb", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MsixImageUri model = new MsixImageUri().withUri("nyowxwlmdjrkvfg"); + MsixImageUri model = new MsixImageUri().withUri("zb"); model = BinaryData.fromObject(model).toObject(MsixImageUri.class); - Assertions.assertEquals("nyowxwlmdjrkvfg", model.uri()); + Assertions.assertEquals("zb", model.uri()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandMockTests.java index ecf9afc97265..6ce8e89a96ce 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandMockTests.java @@ -33,7 +33,7 @@ public void testExpand() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"properties\":{\"packageAlias\":\"jcxcjxgrytfmpcyc\",\"imagePath\":\"rmcaykgg\",\"packageName\":\"xu\",\"packageFamilyName\":\"rksxwpndfc\",\"packageFullName\":\"nznthjtw\",\"displayName\":\"aosrxuz\",\"packageRelativePath\":\"amktcqiosmgbzah\",\"isRegularRegistration\":false,\"isActive\":true,\"packageDependencies\":[],\"version\":\"ltlaprltzkatbhj\",\"lastUpdated\":\"2021-11-12T18:26:07Z\",\"packageApplications\":[]},\"id\":\"s\",\"name\":\"qeqala\",\"type\":\"vlagun\"}]}"; + "{\"value\":[{\"properties\":{\"packageAlias\":\"hmpejtlkexaonw\",\"imagePath\":\"kcq\",\"packageName\":\"xhxknlc\",\"packageFamilyName\":\"mmkyu\",\"packageFullName\":\"jubyqjfkakfq\",\"displayName\":\"kemyil\",\"packageRelativePath\":\"dxjascowvfdj\",\"isRegularRegistration\":false,\"isActive\":false,\"packageDependencies\":[{\"dependencyName\":\"ksnmgzv\",\"publisher\":\"ij\",\"minVersion\":\"zuqnwsithuqo\"},{\"dependencyName\":\"ah\",\"publisher\":\"qwqul\",\"minVersion\":\"trjbhxykfhyq\"},{\"dependencyName\":\"vqqugdrftbcv\",\"publisher\":\"reuquowtljvf\",\"minVersion\":\"reagkhyxvrqt\"}],\"version\":\"czsulmdggl\",\"lastUpdated\":\"2021-11-17T19:55:24Z\",\"packageApplications\":[{\"appId\":\"s\",\"description\":\"kgsangpszng\",\"appUserModelID\":\"p\",\"friendlyName\":\"lkvec\",\"iconImageName\":\"jcngoadyed\"},{\"appId\":\"jfoknubnoitpkp\",\"description\":\"rgdg\",\"appUserModelID\":\"coqra\",\"friendlyName\":\"ugyxpqit\",\"iconImageName\":\"ialwv\"}]},\"id\":\"uhz\",\"name\":\"caqt\",\"type\":\"ltcoqc\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -64,18 +64,26 @@ public void testExpand() throws Exception { PagedIterable response = manager .msixImages() - .expand("vefloccsrmozihmi", "g", new MsixImageUri().withUri("txx"), com.azure.core.util.Context.NONE); + .expand("oaiknaqlnuwig", "yxl", new MsixImageUri().withUri("wphvxz"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("jcxcjxgrytfmpcyc", response.iterator().next().packageAlias()); - Assertions.assertEquals("rmcaykgg", response.iterator().next().imagePath()); - Assertions.assertEquals("xu", response.iterator().next().packageName()); - Assertions.assertEquals("rksxwpndfc", response.iterator().next().packageFamilyName()); - Assertions.assertEquals("nznthjtw", response.iterator().next().packageFullName()); - Assertions.assertEquals("aosrxuz", response.iterator().next().displayName()); - Assertions.assertEquals("amktcqiosmgbzah", response.iterator().next().packageRelativePath()); + Assertions.assertEquals("hmpejtlkexaonw", response.iterator().next().packageAlias()); + Assertions.assertEquals("kcq", response.iterator().next().imagePath()); + Assertions.assertEquals("xhxknlc", response.iterator().next().packageName()); + Assertions.assertEquals("mmkyu", response.iterator().next().packageFamilyName()); + Assertions.assertEquals("jubyqjfkakfq", response.iterator().next().packageFullName()); + Assertions.assertEquals("kemyil", response.iterator().next().displayName()); + Assertions.assertEquals("dxjascowvfdj", response.iterator().next().packageRelativePath()); Assertions.assertEquals(false, response.iterator().next().isRegularRegistration()); - Assertions.assertEquals(true, response.iterator().next().isActive()); - Assertions.assertEquals("ltlaprltzkatbhj", response.iterator().next().version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-12T18:26:07Z"), response.iterator().next().lastUpdated()); + Assertions.assertEquals(false, response.iterator().next().isActive()); + Assertions.assertEquals("ksnmgzv", response.iterator().next().packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("ij", response.iterator().next().packageDependencies().get(0).publisher()); + Assertions.assertEquals("zuqnwsithuqo", response.iterator().next().packageDependencies().get(0).minVersion()); + Assertions.assertEquals("czsulmdggl", response.iterator().next().version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-17T19:55:24Z"), response.iterator().next().lastUpdated()); + Assertions.assertEquals("s", response.iterator().next().packageApplications().get(0).appId()); + Assertions.assertEquals("kgsangpszng", response.iterator().next().packageApplications().get(0).description()); + Assertions.assertEquals("p", response.iterator().next().packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("lkvec", response.iterator().next().packageApplications().get(0).friendlyName()); + Assertions.assertEquals("jcngoadyed", response.iterator().next().packageApplications().get(0).iconImageName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageApplicationsTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageApplicationsTests.java index 05538f6e5784..831d8daa2fda 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageApplicationsTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageApplicationsTests.java @@ -14,29 +14,29 @@ public void testDeserialize() throws Exception { MsixPackageApplications model = BinaryData .fromString( - "{\"appId\":\"yylhalnswhccsp\",\"description\":\"aivwitqscywu\",\"appUserModelID\":\"woluhczbwemhair\",\"friendlyName\":\"rgzdwmsweyp\",\"iconImageName\":\"dxggicccnxqhuexm\"}") + "{\"appId\":\"xeclzedqbcvhzlhp\",\"description\":\"dqkdlwwqfbu\",\"appUserModelID\":\"kxtrq\",\"friendlyName\":\"smlmbtxhwgfwsrta\",\"iconImageName\":\"oezbrhubsk\"}") .toObject(MsixPackageApplications.class); - Assertions.assertEquals("yylhalnswhccsp", model.appId()); - Assertions.assertEquals("aivwitqscywu", model.description()); - Assertions.assertEquals("woluhczbwemhair", model.appUserModelId()); - Assertions.assertEquals("rgzdwmsweyp", model.friendlyName()); - Assertions.assertEquals("dxggicccnxqhuexm", model.iconImageName()); + Assertions.assertEquals("xeclzedqbcvhzlhp", model.appId()); + Assertions.assertEquals("dqkdlwwqfbu", model.description()); + Assertions.assertEquals("kxtrq", model.appUserModelId()); + Assertions.assertEquals("smlmbtxhwgfwsrta", model.friendlyName()); + Assertions.assertEquals("oezbrhubsk", model.iconImageName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MsixPackageApplications model = new MsixPackageApplications() - .withAppId("yylhalnswhccsp") - .withDescription("aivwitqscywu") - .withAppUserModelId("woluhczbwemhair") - .withFriendlyName("rgzdwmsweyp") - .withIconImageName("dxggicccnxqhuexm"); + .withAppId("xeclzedqbcvhzlhp") + .withDescription("dqkdlwwqfbu") + .withAppUserModelId("kxtrq") + .withFriendlyName("smlmbtxhwgfwsrta") + .withIconImageName("oezbrhubsk"); model = BinaryData.fromObject(model).toObject(MsixPackageApplications.class); - Assertions.assertEquals("yylhalnswhccsp", model.appId()); - Assertions.assertEquals("aivwitqscywu", model.description()); - Assertions.assertEquals("woluhczbwemhair", model.appUserModelId()); - Assertions.assertEquals("rgzdwmsweyp", model.friendlyName()); - Assertions.assertEquals("dxggicccnxqhuexm", model.iconImageName()); + Assertions.assertEquals("xeclzedqbcvhzlhp", model.appId()); + Assertions.assertEquals("dqkdlwwqfbu", model.description()); + Assertions.assertEquals("kxtrq", model.appUserModelId()); + Assertions.assertEquals("smlmbtxhwgfwsrta", model.friendlyName()); + Assertions.assertEquals("oezbrhubsk", model.iconImageName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageDependenciesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageDependenciesTests.java index 26aef8890ed8..98cb9643dce8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageDependenciesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageDependenciesTests.java @@ -13,23 +13,24 @@ public final class MsixPackageDependenciesTests { public void testDeserialize() throws Exception { MsixPackageDependencies model = BinaryData - .fromString("{\"dependencyName\":\"zqhof\",\"publisher\":\"maequiahxicslfa\",\"minVersion\":\"z\"}") + .fromString( + "{\"dependencyName\":\"yklyhpluodpvruud\",\"publisher\":\"zibt\",\"minVersion\":\"stgktst\"}") .toObject(MsixPackageDependencies.class); - Assertions.assertEquals("zqhof", model.dependencyName()); - Assertions.assertEquals("maequiahxicslfa", model.publisher()); - Assertions.assertEquals("z", model.minVersion()); + Assertions.assertEquals("yklyhpluodpvruud", model.dependencyName()); + Assertions.assertEquals("zibt", model.publisher()); + Assertions.assertEquals("stgktst", model.minVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MsixPackageDependencies model = new MsixPackageDependencies() - .withDependencyName("zqhof") - .withPublisher("maequiahxicslfa") - .withMinVersion("z"); + .withDependencyName("yklyhpluodpvruud") + .withPublisher("zibt") + .withMinVersion("stgktst"); model = BinaryData.fromObject(model).toObject(MsixPackageDependencies.class); - Assertions.assertEquals("zqhof", model.dependencyName()); - Assertions.assertEquals("maequiahxicslfa", model.publisher()); - Assertions.assertEquals("z", model.minVersion()); + Assertions.assertEquals("yklyhpluodpvruud", model.dependencyName()); + Assertions.assertEquals("zibt", model.publisher()); + Assertions.assertEquals("stgktst", model.minVersion()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageInnerTests.java index ef6d02c1e3c8..1e2017bef96f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageInnerTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageInnerTests.java @@ -18,85 +18,87 @@ public void testDeserialize() throws Exception { MsixPackageInner model = BinaryData .fromString( - "{\"properties\":{\"imagePath\":\"xoruzfgsquyfxrx\",\"packageName\":\"eptra\",\"packageFamilyName\":\"jezwlwnw\",\"displayName\":\"qlcvydy\",\"packageRelativePath\":\"tdooaoj\",\"isRegularRegistration\":true,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"ebwnujhe\",\"publisher\":\"sbvdkcrodtjinfw\",\"minVersion\":\"fltkacjv\"}],\"version\":\"kdlfoa\",\"lastUpdated\":\"2020-12-29T16:57:58Z\",\"packageApplications\":[{\"appId\":\"agaowpulpqblylsy\",\"description\":\"qjnsjervtia\",\"appUserModelID\":\"sdszue\",\"friendlyName\":\"sbzkf\",\"iconImageName\":\"eyvpnqicvinvkj\"},{\"appId\":\"rbuukzclewyhmlwp\",\"description\":\"tzpofncckwyfzq\",\"appUserModelID\":\"xxbuyq\",\"friendlyName\":\"zfeqztppri\",\"iconImageName\":\"xorjaltolmncwsob\"},{\"appId\":\"dbnw\",\"description\":\"fhucqdpfuv\",\"appUserModelID\":\"sbjjc\",\"friendlyName\":\"vxb\",\"iconImageName\":\"vudutncor\"}]},\"id\":\"xqtvcofu\",\"name\":\"f\",\"type\":\"vkg\"}") + "{\"properties\":{\"imagePath\":\"swdvzyybycnun\",\"packageName\":\"srtkfa\",\"packageFamilyName\":\"opqgikyzirtxdyux\",\"displayName\":\"jntpsewgioilqu\",\"packageRelativePath\":\"ydxtqm\",\"isRegularRegistration\":false,\"isActive\":false,\"packageDependencies\":[{\"dependencyName\":\"ufhyaomtbgh\",\"publisher\":\"vgrvkffo\",\"minVersion\":\"zh\"},{\"dependencyName\":\"bibgjmfxumv\",\"publisher\":\"luyovwxnbkfezzx\",\"minVersion\":\"yhwzdgiruj\"},{\"dependencyName\":\"bomvzzbtdcqv\",\"publisher\":\"iyujviylwdshfs\",\"minVersion\":\"rbgyefry\"}],\"version\":\"gaojf\",\"lastUpdated\":\"2021-04-10T10:30:40Z\",\"packageApplications\":[{\"appId\":\"mrfhirctymox\",\"description\":\"tpipiwyczuhx\",\"appUserModelID\":\"pqjlihhyusps\",\"friendlyName\":\"sdvlmfwdgzxulucv\",\"iconImageName\":\"mrsreuzvxurisjnh\"},{\"appId\":\"ifqjz\",\"description\":\"mrhublwpc\",\"appUserModelID\":\"utr\",\"friendlyName\":\"upauut\",\"iconImageName\":\"oqh\"}]},\"id\":\"jqgwzp\",\"name\":\"fqntcyp\",\"type\":\"xjvfoimwksl\"}") .toObject(MsixPackageInner.class); - Assertions.assertEquals("xoruzfgsquyfxrx", model.imagePath()); - Assertions.assertEquals("eptra", model.packageName()); - Assertions.assertEquals("jezwlwnw", model.packageFamilyName()); - Assertions.assertEquals("qlcvydy", model.displayName()); - Assertions.assertEquals("tdooaoj", model.packageRelativePath()); - Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals(true, model.isActive()); - Assertions.assertEquals("ebwnujhe", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("sbvdkcrodtjinfw", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("fltkacjv", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("kdlfoa", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-29T16:57:58Z"), model.lastUpdated()); - Assertions.assertEquals("agaowpulpqblylsy", model.packageApplications().get(0).appId()); - Assertions.assertEquals("qjnsjervtia", model.packageApplications().get(0).description()); - Assertions.assertEquals("sdszue", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("sbzkf", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("eyvpnqicvinvkj", model.packageApplications().get(0).iconImageName()); + Assertions.assertEquals("swdvzyybycnun", model.imagePath()); + Assertions.assertEquals("srtkfa", model.packageName()); + Assertions.assertEquals("opqgikyzirtxdyux", model.packageFamilyName()); + Assertions.assertEquals("jntpsewgioilqu", model.displayName()); + Assertions.assertEquals("ydxtqm", model.packageRelativePath()); + Assertions.assertEquals(false, model.isRegularRegistration()); + Assertions.assertEquals(false, model.isActive()); + Assertions.assertEquals("ufhyaomtbgh", model.packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("vgrvkffo", model.packageDependencies().get(0).publisher()); + Assertions.assertEquals("zh", model.packageDependencies().get(0).minVersion()); + Assertions.assertEquals("gaojf", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T10:30:40Z"), model.lastUpdated()); + Assertions.assertEquals("mrfhirctymox", model.packageApplications().get(0).appId()); + Assertions.assertEquals("tpipiwyczuhx", model.packageApplications().get(0).description()); + Assertions.assertEquals("pqjlihhyusps", model.packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("sdvlmfwdgzxulucv", model.packageApplications().get(0).friendlyName()); + Assertions.assertEquals("mrsreuzvxurisjnh", model.packageApplications().get(0).iconImageName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MsixPackageInner model = new MsixPackageInner() - .withImagePath("xoruzfgsquyfxrx") - .withPackageName("eptra") - .withPackageFamilyName("jezwlwnw") - .withDisplayName("qlcvydy") - .withPackageRelativePath("tdooaoj") - .withIsRegularRegistration(true) - .withIsActive(true) + .withImagePath("swdvzyybycnun") + .withPackageName("srtkfa") + .withPackageFamilyName("opqgikyzirtxdyux") + .withDisplayName("jntpsewgioilqu") + .withPackageRelativePath("ydxtqm") + .withIsRegularRegistration(false) + .withIsActive(false) .withPackageDependencies( Arrays .asList( new MsixPackageDependencies() - .withDependencyName("ebwnujhe") - .withPublisher("sbvdkcrodtjinfw") - .withMinVersion("fltkacjv"))) - .withVersion("kdlfoa") - .withLastUpdated(OffsetDateTime.parse("2020-12-29T16:57:58Z")) + .withDependencyName("ufhyaomtbgh") + .withPublisher("vgrvkffo") + .withMinVersion("zh"), + new MsixPackageDependencies() + .withDependencyName("bibgjmfxumv") + .withPublisher("luyovwxnbkfezzx") + .withMinVersion("yhwzdgiruj"), + new MsixPackageDependencies() + .withDependencyName("bomvzzbtdcqv") + .withPublisher("iyujviylwdshfs") + .withMinVersion("rbgyefry"))) + .withVersion("gaojf") + .withLastUpdated(OffsetDateTime.parse("2021-04-10T10:30:40Z")) .withPackageApplications( Arrays .asList( new MsixPackageApplications() - .withAppId("agaowpulpqblylsy") - .withDescription("qjnsjervtia") - .withAppUserModelId("sdszue") - .withFriendlyName("sbzkf") - .withIconImageName("eyvpnqicvinvkj"), - new MsixPackageApplications() - .withAppId("rbuukzclewyhmlwp") - .withDescription("tzpofncckwyfzq") - .withAppUserModelId("xxbuyq") - .withFriendlyName("zfeqztppri") - .withIconImageName("xorjaltolmncwsob"), + .withAppId("mrfhirctymox") + .withDescription("tpipiwyczuhx") + .withAppUserModelId("pqjlihhyusps") + .withFriendlyName("sdvlmfwdgzxulucv") + .withIconImageName("mrsreuzvxurisjnh"), new MsixPackageApplications() - .withAppId("dbnw") - .withDescription("fhucqdpfuv") - .withAppUserModelId("sbjjc") - .withFriendlyName("vxb") - .withIconImageName("vudutncor"))); + .withAppId("ifqjz") + .withDescription("mrhublwpc") + .withAppUserModelId("utr") + .withFriendlyName("upauut") + .withIconImageName("oqh"))); model = BinaryData.fromObject(model).toObject(MsixPackageInner.class); - Assertions.assertEquals("xoruzfgsquyfxrx", model.imagePath()); - Assertions.assertEquals("eptra", model.packageName()); - Assertions.assertEquals("jezwlwnw", model.packageFamilyName()); - Assertions.assertEquals("qlcvydy", model.displayName()); - Assertions.assertEquals("tdooaoj", model.packageRelativePath()); - Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals(true, model.isActive()); - Assertions.assertEquals("ebwnujhe", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("sbvdkcrodtjinfw", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("fltkacjv", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("kdlfoa", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-29T16:57:58Z"), model.lastUpdated()); - Assertions.assertEquals("agaowpulpqblylsy", model.packageApplications().get(0).appId()); - Assertions.assertEquals("qjnsjervtia", model.packageApplications().get(0).description()); - Assertions.assertEquals("sdszue", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("sbzkf", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("eyvpnqicvinvkj", model.packageApplications().get(0).iconImageName()); + Assertions.assertEquals("swdvzyybycnun", model.imagePath()); + Assertions.assertEquals("srtkfa", model.packageName()); + Assertions.assertEquals("opqgikyzirtxdyux", model.packageFamilyName()); + Assertions.assertEquals("jntpsewgioilqu", model.displayName()); + Assertions.assertEquals("ydxtqm", model.packageRelativePath()); + Assertions.assertEquals(false, model.isRegularRegistration()); + Assertions.assertEquals(false, model.isActive()); + Assertions.assertEquals("ufhyaomtbgh", model.packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("vgrvkffo", model.packageDependencies().get(0).publisher()); + Assertions.assertEquals("zh", model.packageDependencies().get(0).minVersion()); + Assertions.assertEquals("gaojf", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T10:30:40Z"), model.lastUpdated()); + Assertions.assertEquals("mrfhirctymox", model.packageApplications().get(0).appId()); + Assertions.assertEquals("tpipiwyczuhx", model.packageApplications().get(0).description()); + Assertions.assertEquals("pqjlihhyusps", model.packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("sdvlmfwdgzxulucv", model.packageApplications().get(0).friendlyName()); + Assertions.assertEquals("mrsreuzvxurisjnh", model.packageApplications().get(0).iconImageName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageListTests.java index f03895ca4046..06dc1945824a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageListTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageListTests.java @@ -6,6 +6,8 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.MsixPackageInner; +import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; +import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies; import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageList; import java.time.OffsetDateTime; import java.util.Arrays; @@ -17,17 +19,25 @@ public void testDeserialize() throws Exception { MsixPackageList model = BinaryData .fromString( - "{\"value\":[{\"properties\":{\"imagePath\":\"r\",\"packageName\":\"vu\",\"packageFamilyName\":\"raehtwdwrft\",\"displayName\":\"iby\",\"packageRelativePath\":\"dl\",\"isRegularRegistration\":true,\"isActive\":true,\"packageDependencies\":[],\"version\":\"racstwity\",\"lastUpdated\":\"2021-10-09T17:15:47Z\",\"packageApplications\":[]},\"id\":\"xccedcpnmdyodn\",\"name\":\"zxltjcvn\",\"type\":\"ltiugcxnavv\"}],\"nextLink\":\"qiby\"}") + "{\"value\":[{\"properties\":{\"imagePath\":\"tiewdj\",\"packageName\":\"bquwrbehw\",\"packageFamilyName\":\"o\",\"displayName\":\"uffkmrqemvvh\",\"packageRelativePath\":\"tdrjfutacoebj\",\"isRegularRegistration\":true,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"m\",\"publisher\":\"pmguaadraufac\",\"minVersion\":\"ahzovajjziuxxp\"},{\"dependencyName\":\"neekulfg\",\"publisher\":\"qubkw\",\"minVersion\":\"enr\"}],\"version\":\"utujba\",\"lastUpdated\":\"2021-06-27T02:39:57Z\",\"packageApplications\":[{\"appId\":\"minyflnorwm\",\"description\":\"vwpklvxwmygdxp\",\"appUserModelID\":\"qchiszep\",\"friendlyName\":\"bjcrxgibbdaxco\",\"iconImageName\":\"ozauorsukokwb\"}]},\"id\":\"hlvnuuepzlr\",\"name\":\"hw\",\"type\":\"soldweyuqdunv\"},{\"properties\":{\"imagePath\":\"rwrbi\",\"packageName\":\"ktalywjhhgdnhxms\",\"packageFamilyName\":\"fomiloxgg\",\"displayName\":\"fi\",\"packageRelativePath\":\"dieuzaofj\",\"isRegularRegistration\":false,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"fgdo\",\"publisher\":\"ubiipuipwoqonma\",\"minVersion\":\"ekni\"}],\"version\":\"hqvcimpevfgmblr\",\"lastUpdated\":\"2021-02-01T14:17Z\",\"packageApplications\":[{\"appId\":\"dxsm\",\"description\":\"cwrwfs\",\"appUserModelID\":\"fnynszqujizdvoqy\",\"friendlyName\":\"byowbblgyavutp\",\"iconImageName\":\"joxoism\"},{\"appId\":\"pi\",\"description\":\"qolj\",\"appUserModelID\":\"cgxxlxs\",\"friendlyName\":\"gcvizqzdwlvwlyou\",\"iconImageName\":\"gfbkjubdyh\"}]},\"id\":\"minsgowzf\",\"name\":\"tsttktlahbq\",\"type\":\"ctxtgzukxi\"},{\"properties\":{\"imagePath\":\"qtgqqqxhrnxr\",\"packageName\":\"pjui\",\"packageFamilyName\":\"vokqdzfv\",\"displayName\":\"ivjlfrqttbajlka\",\"packageRelativePath\":\"wxyiopidkqq\",\"isRegularRegistration\":true,\"isActive\":false,\"packageDependencies\":[{\"dependencyName\":\"dmligovibrxk\",\"publisher\":\"loazuruocbgoo\",\"minVersion\":\"te\"},{\"dependencyName\":\"bfhjxakvvjgsl\",\"publisher\":\"dilmyww\",\"minVersion\":\"gkxnyedabg\"}],\"version\":\"udtjuewbc\",\"lastUpdated\":\"2021-05-21T16:55:19Z\",\"packageApplications\":[{\"appId\":\"hcjyxc\",\"description\":\"bvpa\",\"appUserModelID\":\"kkudzp\",\"friendlyName\":\"wjplma\",\"iconImageName\":\"tcyohpfkyrk\"},{\"appId\":\"iogsjkmnwq\",\"description\":\"obaiyhddviaceg\",\"appUserModelID\":\"m\",\"friendlyName\":\"fpmvmemfnczd\",\"iconImageName\":\"vbalxlllc\"},{\"appId\":\"bzevwrd\",\"description\":\"fukuvsjcswsmystu\",\"appUserModelID\":\"qypfcv\",\"friendlyName\":\"rchpqbmfpjbabwid\",\"iconImageName\":\"xsspuunnoxyhk\"}]},\"id\":\"ddrihpf\",\"name\":\"oqcaaewdaomdj\",\"type\":\"l\"}],\"nextLink\":\"x\"}") .toObject(MsixPackageList.class); - Assertions.assertEquals("r", model.value().get(0).imagePath()); - Assertions.assertEquals("vu", model.value().get(0).packageName()); - Assertions.assertEquals("raehtwdwrft", model.value().get(0).packageFamilyName()); - Assertions.assertEquals("iby", model.value().get(0).displayName()); - Assertions.assertEquals("dl", model.value().get(0).packageRelativePath()); + Assertions.assertEquals("tiewdj", model.value().get(0).imagePath()); + Assertions.assertEquals("bquwrbehw", model.value().get(0).packageName()); + Assertions.assertEquals("o", model.value().get(0).packageFamilyName()); + Assertions.assertEquals("uffkmrqemvvh", model.value().get(0).displayName()); + Assertions.assertEquals("tdrjfutacoebj", model.value().get(0).packageRelativePath()); Assertions.assertEquals(true, model.value().get(0).isRegularRegistration()); Assertions.assertEquals(true, model.value().get(0).isActive()); - Assertions.assertEquals("racstwity", model.value().get(0).version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-09T17:15:47Z"), model.value().get(0).lastUpdated()); + Assertions.assertEquals("m", model.value().get(0).packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("pmguaadraufac", model.value().get(0).packageDependencies().get(0).publisher()); + Assertions.assertEquals("ahzovajjziuxxp", model.value().get(0).packageDependencies().get(0).minVersion()); + Assertions.assertEquals("utujba", model.value().get(0).version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-27T02:39:57Z"), model.value().get(0).lastUpdated()); + Assertions.assertEquals("minyflnorwm", model.value().get(0).packageApplications().get(0).appId()); + Assertions.assertEquals("vwpklvxwmygdxp", model.value().get(0).packageApplications().get(0).description()); + Assertions.assertEquals("qchiszep", model.value().get(0).packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("bjcrxgibbdaxco", model.value().get(0).packageApplications().get(0).friendlyName()); + Assertions.assertEquals("ozauorsukokwb", model.value().get(0).packageApplications().get(0).iconImageName()); } @org.junit.jupiter.api.Test @@ -38,26 +48,126 @@ public void testSerialize() throws Exception { Arrays .asList( new MsixPackageInner() - .withImagePath("r") - .withPackageName("vu") - .withPackageFamilyName("raehtwdwrft") - .withDisplayName("iby") - .withPackageRelativePath("dl") + .withImagePath("tiewdj") + .withPackageName("bquwrbehw") + .withPackageFamilyName("o") + .withDisplayName("uffkmrqemvvh") + .withPackageRelativePath("tdrjfutacoebj") .withIsRegularRegistration(true) .withIsActive(true) - .withPackageDependencies(Arrays.asList()) - .withVersion("racstwity") - .withLastUpdated(OffsetDateTime.parse("2021-10-09T17:15:47Z")) - .withPackageApplications(Arrays.asList()))); + .withPackageDependencies( + Arrays + .asList( + new MsixPackageDependencies() + .withDependencyName("m") + .withPublisher("pmguaadraufac") + .withMinVersion("ahzovajjziuxxp"), + new MsixPackageDependencies() + .withDependencyName("neekulfg") + .withPublisher("qubkw") + .withMinVersion("enr"))) + .withVersion("utujba") + .withLastUpdated(OffsetDateTime.parse("2021-06-27T02:39:57Z")) + .withPackageApplications( + Arrays + .asList( + new MsixPackageApplications() + .withAppId("minyflnorwm") + .withDescription("vwpklvxwmygdxp") + .withAppUserModelId("qchiszep") + .withFriendlyName("bjcrxgibbdaxco") + .withIconImageName("ozauorsukokwb"))), + new MsixPackageInner() + .withImagePath("rwrbi") + .withPackageName("ktalywjhhgdnhxms") + .withPackageFamilyName("fomiloxgg") + .withDisplayName("fi") + .withPackageRelativePath("dieuzaofj") + .withIsRegularRegistration(false) + .withIsActive(true) + .withPackageDependencies( + Arrays + .asList( + new MsixPackageDependencies() + .withDependencyName("fgdo") + .withPublisher("ubiipuipwoqonma") + .withMinVersion("ekni"))) + .withVersion("hqvcimpevfgmblr") + .withLastUpdated(OffsetDateTime.parse("2021-02-01T14:17Z")) + .withPackageApplications( + Arrays + .asList( + new MsixPackageApplications() + .withAppId("dxsm") + .withDescription("cwrwfs") + .withAppUserModelId("fnynszqujizdvoqy") + .withFriendlyName("byowbblgyavutp") + .withIconImageName("joxoism"), + new MsixPackageApplications() + .withAppId("pi") + .withDescription("qolj") + .withAppUserModelId("cgxxlxs") + .withFriendlyName("gcvizqzdwlvwlyou") + .withIconImageName("gfbkjubdyh"))), + new MsixPackageInner() + .withImagePath("qtgqqqxhrnxr") + .withPackageName("pjui") + .withPackageFamilyName("vokqdzfv") + .withDisplayName("ivjlfrqttbajlka") + .withPackageRelativePath("wxyiopidkqq") + .withIsRegularRegistration(true) + .withIsActive(false) + .withPackageDependencies( + Arrays + .asList( + new MsixPackageDependencies() + .withDependencyName("dmligovibrxk") + .withPublisher("loazuruocbgoo") + .withMinVersion("te"), + new MsixPackageDependencies() + .withDependencyName("bfhjxakvvjgsl") + .withPublisher("dilmyww") + .withMinVersion("gkxnyedabg"))) + .withVersion("udtjuewbc") + .withLastUpdated(OffsetDateTime.parse("2021-05-21T16:55:19Z")) + .withPackageApplications( + Arrays + .asList( + new MsixPackageApplications() + .withAppId("hcjyxc") + .withDescription("bvpa") + .withAppUserModelId("kkudzp") + .withFriendlyName("wjplma") + .withIconImageName("tcyohpfkyrk"), + new MsixPackageApplications() + .withAppId("iogsjkmnwq") + .withDescription("obaiyhddviaceg") + .withAppUserModelId("m") + .withFriendlyName("fpmvmemfnczd") + .withIconImageName("vbalxlllc"), + new MsixPackageApplications() + .withAppId("bzevwrd") + .withDescription("fukuvsjcswsmystu") + .withAppUserModelId("qypfcv") + .withFriendlyName("rchpqbmfpjbabwid") + .withIconImageName("xsspuunnoxyhk"))))); model = BinaryData.fromObject(model).toObject(MsixPackageList.class); - Assertions.assertEquals("r", model.value().get(0).imagePath()); - Assertions.assertEquals("vu", model.value().get(0).packageName()); - Assertions.assertEquals("raehtwdwrft", model.value().get(0).packageFamilyName()); - Assertions.assertEquals("iby", model.value().get(0).displayName()); - Assertions.assertEquals("dl", model.value().get(0).packageRelativePath()); + Assertions.assertEquals("tiewdj", model.value().get(0).imagePath()); + Assertions.assertEquals("bquwrbehw", model.value().get(0).packageName()); + Assertions.assertEquals("o", model.value().get(0).packageFamilyName()); + Assertions.assertEquals("uffkmrqemvvh", model.value().get(0).displayName()); + Assertions.assertEquals("tdrjfutacoebj", model.value().get(0).packageRelativePath()); Assertions.assertEquals(true, model.value().get(0).isRegularRegistration()); Assertions.assertEquals(true, model.value().get(0).isActive()); - Assertions.assertEquals("racstwity", model.value().get(0).version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-09T17:15:47Z"), model.value().get(0).lastUpdated()); + Assertions.assertEquals("m", model.value().get(0).packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("pmguaadraufac", model.value().get(0).packageDependencies().get(0).publisher()); + Assertions.assertEquals("ahzovajjziuxxp", model.value().get(0).packageDependencies().get(0).minVersion()); + Assertions.assertEquals("utujba", model.value().get(0).version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-27T02:39:57Z"), model.value().get(0).lastUpdated()); + Assertions.assertEquals("minyflnorwm", model.value().get(0).packageApplications().get(0).appId()); + Assertions.assertEquals("vwpklvxwmygdxp", model.value().get(0).packageApplications().get(0).description()); + Assertions.assertEquals("qchiszep", model.value().get(0).packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("bjcrxgibbdaxco", model.value().get(0).packageApplications().get(0).friendlyName()); + Assertions.assertEquals("ozauorsukokwb", model.value().get(0).packageApplications().get(0).iconImageName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchPropertiesTests.java index feeefc31a642..7d4970753b26 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchPropertiesTests.java @@ -13,11 +13,11 @@ public final class MsixPackagePatchPropertiesTests { public void testDeserialize() throws Exception { MsixPackagePatchProperties model = BinaryData - .fromString("{\"isActive\":false,\"isRegularRegistration\":true,\"displayName\":\"pelol\"}") + .fromString("{\"isActive\":false,\"isRegularRegistration\":false,\"displayName\":\"yjkqabqgzslesjcb\"}") .toObject(MsixPackagePatchProperties.class); Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals("pelol", model.displayName()); + Assertions.assertEquals(false, model.isRegularRegistration()); + Assertions.assertEquals("yjkqabqgzslesjcb", model.displayName()); } @org.junit.jupiter.api.Test @@ -25,11 +25,11 @@ public void testSerialize() throws Exception { MsixPackagePatchProperties model = new MsixPackagePatchProperties() .withIsActive(false) - .withIsRegularRegistration(true) - .withDisplayName("pelol"); + .withIsRegularRegistration(false) + .withDisplayName("yjkqabqgzslesjcb"); model = BinaryData.fromObject(model).toObject(MsixPackagePatchProperties.class); Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals("pelol", model.displayName()); + Assertions.assertEquals(false, model.isRegularRegistration()); + Assertions.assertEquals("yjkqabqgzslesjcb", model.displayName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchTests.java index 759ae02dc0ca..778ed043741c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchTests.java @@ -14,20 +14,20 @@ public void testDeserialize() throws Exception { MsixPackagePatch model = BinaryData .fromString( - "{\"properties\":{\"isActive\":false,\"isRegularRegistration\":true,\"displayName\":\"ywemhzrn\"},\"id\":\"sdtclusiypbs\",\"name\":\"gytguslfead\",\"type\":\"ygqukyhejh\"}") + "{\"properties\":{\"isActive\":false,\"isRegularRegistration\":true,\"displayName\":\"kqfqjbvl\"},\"id\":\"orfmluiqt\",\"name\":\"zf\",\"type\":\"vyvnqqyb\"}") .toObject(MsixPackagePatch.class); Assertions.assertEquals(false, model.isActive()); Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals("ywemhzrn", model.displayName()); + Assertions.assertEquals("kqfqjbvl", model.displayName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MsixPackagePatch model = - new MsixPackagePatch().withIsActive(false).withIsRegularRegistration(true).withDisplayName("ywemhzrn"); + new MsixPackagePatch().withIsActive(false).withIsRegularRegistration(true).withDisplayName("kqfqjbvl"); model = BinaryData.fromObject(model).toObject(MsixPackagePatch.class); Assertions.assertEquals(false, model.isActive()); Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals("ywemhzrn", model.displayName()); + Assertions.assertEquals("kqfqjbvl", model.displayName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePropertiesTests.java index f1b4f63d4f39..c0e5cf0edd28 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePropertiesTests.java @@ -18,95 +18,77 @@ public void testDeserialize() throws Exception { MsixPackageProperties model = BinaryData .fromString( - "{\"imagePath\":\"bgdknnqv\",\"packageName\":\"znqntoru\",\"packageFamilyName\":\"gsahmkycgrauw\",\"displayName\":\"etaebu\",\"packageRelativePath\":\"vdmovsmzlxwabm\",\"isRegularRegistration\":false,\"isActive\":false,\"packageDependencies\":[{\"dependencyName\":\"vtpuqujmqlgk\",\"publisher\":\"tndoaongbjc\",\"minVersion\":\"ujitcjedftww\"},{\"dependencyName\":\"zkoj\",\"publisher\":\"c\",\"minVersion\":\"foqouicybx\"}],\"version\":\"zg\",\"lastUpdated\":\"2021-08-24T17:23:35Z\",\"packageApplications\":[{\"appId\":\"ciqopidoa\",\"description\":\"iodhkhazxkhnz\",\"appUserModelID\":\"nlwntoe\",\"friendlyName\":\"kdwbwhkszz\",\"iconImageName\":\"rvexztvb\"},{\"appId\":\"frao\",\"description\":\"koowtl\",\"appUserModelID\":\"guxawqaldsyuuxi\",\"friendlyName\":\"rqf\",\"iconImageName\":\"wyznkbyku\"},{\"appId\":\"hpagm\",\"description\":\"skdsnfdsdoakg\",\"appUserModelID\":\"lmkk\",\"friendlyName\":\"vdlhewpusdsttwv\",\"iconImageName\":\"vbbejdcng\"},{\"appId\":\"akufgmjz\",\"description\":\"rdgrtw\",\"appUserModelID\":\"nuuzkopbm\",\"friendlyName\":\"rfdwoyu\",\"iconImageName\":\"ziuiefozbhdm\"}]}") + "{\"imagePath\":\"cizjxvydfceacvl\",\"packageName\":\"ygdyftumrtw\",\"packageFamilyName\":\"wjslbiwkojgcyzt\",\"displayName\":\"mznbaeqphch\",\"packageRelativePath\":\"rn\",\"isRegularRegistration\":false,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"ykqgaifmvik\",\"publisher\":\"ydv\",\"minVersion\":\"bejdznxcv\"},{\"dependencyName\":\"rhnj\",\"publisher\":\"olvtnovqfzge\",\"minVersion\":\"dftuljltduce\"}],\"version\":\"tmczuomejwcwwqi\",\"lastUpdated\":\"2021-07-23T13:28:16Z\",\"packageApplications\":[{\"appId\":\"mojmsvpkjprvkw\",\"description\":\"zqljyxgtczh\",\"appUserModelID\":\"dbsdshm\",\"friendlyName\":\"maehvbbxurip\",\"iconImageName\":\"fnhtbaxkgxyw\"}]}") .toObject(MsixPackageProperties.class); - Assertions.assertEquals("bgdknnqv", model.imagePath()); - Assertions.assertEquals("znqntoru", model.packageName()); - Assertions.assertEquals("gsahmkycgrauw", model.packageFamilyName()); - Assertions.assertEquals("etaebu", model.displayName()); - Assertions.assertEquals("vdmovsmzlxwabm", model.packageRelativePath()); + Assertions.assertEquals("cizjxvydfceacvl", model.imagePath()); + Assertions.assertEquals("ygdyftumrtw", model.packageName()); + Assertions.assertEquals("wjslbiwkojgcyzt", model.packageFamilyName()); + Assertions.assertEquals("mznbaeqphch", model.displayName()); + Assertions.assertEquals("rn", model.packageRelativePath()); Assertions.assertEquals(false, model.isRegularRegistration()); - Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals("vtpuqujmqlgk", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("tndoaongbjc", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("ujitcjedftww", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("zg", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-24T17:23:35Z"), model.lastUpdated()); - Assertions.assertEquals("ciqopidoa", model.packageApplications().get(0).appId()); - Assertions.assertEquals("iodhkhazxkhnz", model.packageApplications().get(0).description()); - Assertions.assertEquals("nlwntoe", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("kdwbwhkszz", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("rvexztvb", model.packageApplications().get(0).iconImageName()); + Assertions.assertEquals(true, model.isActive()); + Assertions.assertEquals("ykqgaifmvik", model.packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("ydv", model.packageDependencies().get(0).publisher()); + Assertions.assertEquals("bejdznxcv", model.packageDependencies().get(0).minVersion()); + Assertions.assertEquals("tmczuomejwcwwqi", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T13:28:16Z"), model.lastUpdated()); + Assertions.assertEquals("mojmsvpkjprvkw", model.packageApplications().get(0).appId()); + Assertions.assertEquals("zqljyxgtczh", model.packageApplications().get(0).description()); + Assertions.assertEquals("dbsdshm", model.packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("maehvbbxurip", model.packageApplications().get(0).friendlyName()); + Assertions.assertEquals("fnhtbaxkgxyw", model.packageApplications().get(0).iconImageName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MsixPackageProperties model = new MsixPackageProperties() - .withImagePath("bgdknnqv") - .withPackageName("znqntoru") - .withPackageFamilyName("gsahmkycgrauw") - .withDisplayName("etaebu") - .withPackageRelativePath("vdmovsmzlxwabm") + .withImagePath("cizjxvydfceacvl") + .withPackageName("ygdyftumrtw") + .withPackageFamilyName("wjslbiwkojgcyzt") + .withDisplayName("mznbaeqphch") + .withPackageRelativePath("rn") .withIsRegularRegistration(false) - .withIsActive(false) + .withIsActive(true) .withPackageDependencies( Arrays .asList( new MsixPackageDependencies() - .withDependencyName("vtpuqujmqlgk") - .withPublisher("tndoaongbjc") - .withMinVersion("ujitcjedftww"), + .withDependencyName("ykqgaifmvik") + .withPublisher("ydv") + .withMinVersion("bejdznxcv"), new MsixPackageDependencies() - .withDependencyName("zkoj") - .withPublisher("c") - .withMinVersion("foqouicybx"))) - .withVersion("zg") - .withLastUpdated(OffsetDateTime.parse("2021-08-24T17:23:35Z")) + .withDependencyName("rhnj") + .withPublisher("olvtnovqfzge") + .withMinVersion("dftuljltduce"))) + .withVersion("tmczuomejwcwwqi") + .withLastUpdated(OffsetDateTime.parse("2021-07-23T13:28:16Z")) .withPackageApplications( Arrays .asList( new MsixPackageApplications() - .withAppId("ciqopidoa") - .withDescription("iodhkhazxkhnz") - .withAppUserModelId("nlwntoe") - .withFriendlyName("kdwbwhkszz") - .withIconImageName("rvexztvb"), - new MsixPackageApplications() - .withAppId("frao") - .withDescription("koowtl") - .withAppUserModelId("guxawqaldsyuuxi") - .withFriendlyName("rqf") - .withIconImageName("wyznkbyku"), - new MsixPackageApplications() - .withAppId("hpagm") - .withDescription("skdsnfdsdoakg") - .withAppUserModelId("lmkk") - .withFriendlyName("vdlhewpusdsttwv") - .withIconImageName("vbbejdcng"), - new MsixPackageApplications() - .withAppId("akufgmjz") - .withDescription("rdgrtw") - .withAppUserModelId("nuuzkopbm") - .withFriendlyName("rfdwoyu") - .withIconImageName("ziuiefozbhdm"))); + .withAppId("mojmsvpkjprvkw") + .withDescription("zqljyxgtczh") + .withAppUserModelId("dbsdshm") + .withFriendlyName("maehvbbxurip") + .withIconImageName("fnhtbaxkgxyw"))); model = BinaryData.fromObject(model).toObject(MsixPackageProperties.class); - Assertions.assertEquals("bgdknnqv", model.imagePath()); - Assertions.assertEquals("znqntoru", model.packageName()); - Assertions.assertEquals("gsahmkycgrauw", model.packageFamilyName()); - Assertions.assertEquals("etaebu", model.displayName()); - Assertions.assertEquals("vdmovsmzlxwabm", model.packageRelativePath()); + Assertions.assertEquals("cizjxvydfceacvl", model.imagePath()); + Assertions.assertEquals("ygdyftumrtw", model.packageName()); + Assertions.assertEquals("wjslbiwkojgcyzt", model.packageFamilyName()); + Assertions.assertEquals("mznbaeqphch", model.displayName()); + Assertions.assertEquals("rn", model.packageRelativePath()); Assertions.assertEquals(false, model.isRegularRegistration()); - Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals("vtpuqujmqlgk", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("tndoaongbjc", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("ujitcjedftww", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("zg", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-24T17:23:35Z"), model.lastUpdated()); - Assertions.assertEquals("ciqopidoa", model.packageApplications().get(0).appId()); - Assertions.assertEquals("iodhkhazxkhnz", model.packageApplications().get(0).description()); - Assertions.assertEquals("nlwntoe", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("kdwbwhkszz", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("rvexztvb", model.packageApplications().get(0).iconImageName()); + Assertions.assertEquals(true, model.isActive()); + Assertions.assertEquals("ykqgaifmvik", model.packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("ydv", model.packageDependencies().get(0).publisher()); + Assertions.assertEquals("bejdznxcv", model.packageDependencies().get(0).minVersion()); + Assertions.assertEquals("tmczuomejwcwwqi", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T13:28:16Z"), model.lastUpdated()); + Assertions.assertEquals("mojmsvpkjprvkw", model.packageApplications().get(0).appId()); + Assertions.assertEquals("zqljyxgtczh", model.packageApplications().get(0).description()); + Assertions.assertEquals("dbsdshm", model.packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("maehvbbxurip", model.packageApplications().get(0).friendlyName()); + Assertions.assertEquals("fnhtbaxkgxyw", model.packageApplications().get(0).iconImageName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateWithResponseMockTests.java index 2976999f760a..73cf6d07fd67 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateWithResponseMockTests.java @@ -13,6 +13,8 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; import com.azure.resourcemanager.desktopvirtualization.models.MsixPackage; +import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; +import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -32,7 +34,7 @@ public void testCreateOrUpdateWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"imagePath\":\"smswziqgfuh\",\"packageName\":\"zruswh\",\"packageFamilyName\":\"czznvfbycjsxj\",\"displayName\":\"i\",\"packageRelativePath\":\"vumwmxqh\",\"isRegularRegistration\":true,\"isActive\":false,\"packageDependencies\":[],\"version\":\"dsehaohdjhhflzo\",\"lastUpdated\":\"2021-06-28T18:31:03Z\",\"packageApplications\":[]},\"id\":\"pelnjetag\",\"name\":\"tsxoatftgz\",\"type\":\"npbs\"}"; + "{\"properties\":{\"imagePath\":\"fz\",\"packageName\":\"fwxrzxmdew\",\"packageFamilyName\":\"sxkrpl\",\"displayName\":\"aze\",\"packageRelativePath\":\"w\",\"isRegularRegistration\":false,\"isActive\":false,\"packageDependencies\":[{\"dependencyName\":\"hbrnnhjx\",\"publisher\":\"wjh\",\"minVersion\":\"biwetpo\"},{\"dependencyName\":\"c\",\"publisher\":\"iqyhgfse\",\"minVersion\":\"lexbsf\"}],\"version\":\"dynojpziuwfb\",\"lastUpdated\":\"2021-04-01T20:47:50Z\",\"packageApplications\":[{\"appId\":\"hqsycljselp\",\"description\":\"bafvafhlbylcc\",\"appUserModelID\":\"vxrh\",\"friendlyName\":\"d\",\"iconImageName\":\"rsofpltdbmairrh\"},{\"appId\":\"ra\",\"description\":\"npq\",\"appUserModelID\":\"tuujwouh\",\"friendlyName\":\"wsigrbjbxsj\",\"iconImageName\":\"vitvqkjyaz\"}]},\"id\":\"tggmuwdchozfnkfe\",\"name\":\"lv\",\"type\":\"noakiz\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -63,29 +65,69 @@ public void testCreateOrUpdateWithResponse() throws Exception { MsixPackage response = manager .msixPackages() - .define("xokffqyin") - .withExistingHostPool("jgehkf", "imrt") - .withImagePath("epqw") - .withPackageName("xmonstshi") - .withPackageFamilyName("gvelfc") - .withDisplayName("uccbirdsvuw") - .withPackageRelativePath("b") - .withIsRegularRegistration(true) + .define("hhkuuip") + .withExistingHostPool("wqapfgsdp", "vessm") + .withImagePath("qctekvalb") + .withPackageName("tjqvqyvweht") + .withPackageFamilyName("mxhzzysevus") + .withDisplayName("vzrrryveimi") + .withPackageRelativePath("kdyzatvfuzk") + .withIsRegularRegistration(false) .withIsActive(false) - .withPackageDependencies(Arrays.asList()) - .withVersion("nwjizcilnghgshej") - .withLastUpdated(OffsetDateTime.parse("2021-06-09T08:55:37Z")) - .withPackageApplications(Arrays.asList()) + .withPackageDependencies( + Arrays + .asList( + new MsixPackageDependencies() + .withDependencyName("xwigsye") + .withPublisher("qdsmjtg") + .withMinVersion("gdgkki"))) + .withVersion("plkcsm") + .withLastUpdated(OffsetDateTime.parse("2021-05-26T00:44:03Z")) + .withPackageApplications( + Arrays + .asList( + new MsixPackageApplications() + .withAppId("baedorvvmqfl") + .withDescription("gbdg") + .withAppUserModelId("mgxdgdhpabgd") + .withFriendlyName("jddvjsaqw") + .withIconImageName("mmwllc"), + new MsixPackageApplications() + .withAppId("sxap") + .withDescription("f") + .withAppUserModelId("xcgjokjljnhvlq") + .withFriendlyName("ek") + .withIconImageName("eksnbksdqhjvyk"), + new MsixPackageApplications() + .withAppId("lkhhu") + .withDescription("cpoq") + .withAppUserModelId("vnwqjwgo") + .withFriendlyName("lejjjkxy") + .withIconImageName("fdb"), + new MsixPackageApplications() + .withAppId("tensvkzykj") + .withDescription("kns") + .withAppUserModelId("wushcdp") + .withFriendlyName("pn") + .withIconImageName("mgjfbpkuwxeoio"))) .create(); - Assertions.assertEquals("smswziqgfuh", response.imagePath()); - Assertions.assertEquals("zruswh", response.packageName()); - Assertions.assertEquals("czznvfbycjsxj", response.packageFamilyName()); - Assertions.assertEquals("i", response.displayName()); - Assertions.assertEquals("vumwmxqh", response.packageRelativePath()); - Assertions.assertEquals(true, response.isRegularRegistration()); + Assertions.assertEquals("fz", response.imagePath()); + Assertions.assertEquals("fwxrzxmdew", response.packageName()); + Assertions.assertEquals("sxkrpl", response.packageFamilyName()); + Assertions.assertEquals("aze", response.displayName()); + Assertions.assertEquals("w", response.packageRelativePath()); + Assertions.assertEquals(false, response.isRegularRegistration()); Assertions.assertEquals(false, response.isActive()); - Assertions.assertEquals("dsehaohdjhhflzo", response.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-28T18:31:03Z"), response.lastUpdated()); + Assertions.assertEquals("hbrnnhjx", response.packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("wjh", response.packageDependencies().get(0).publisher()); + Assertions.assertEquals("biwetpo", response.packageDependencies().get(0).minVersion()); + Assertions.assertEquals("dynojpziuwfb", response.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T20:47:50Z"), response.lastUpdated()); + Assertions.assertEquals("hqsycljselp", response.packageApplications().get(0).appId()); + Assertions.assertEquals("bafvafhlbylcc", response.packageApplications().get(0).description()); + Assertions.assertEquals("vxrh", response.packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("d", response.packageApplications().get(0).friendlyName()); + Assertions.assertEquals("rsofpltdbmairrh", response.packageApplications().get(0).iconImageName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteWithResponseMockTests.java index 40be326af70e..49543a692853 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteWithResponseMockTests.java @@ -56,8 +56,6 @@ public void testDeleteWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager - .msixPackages() - .deleteWithResponse("crpfbcunez", "cez", "lfwyfwlwxjwetn", com.azure.core.util.Context.NONE); + manager.msixPackages().deleteWithResponse("taf", "bzf", "ovwmbjlzqsczpgvd", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetWithResponseMockTests.java index 2b16081adb85..822722ac9e80 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetWithResponseMockTests.java @@ -31,7 +31,7 @@ public void testGetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"imagePath\":\"kbsazgak\",\"packageName\":\"cyrcmjdmspo\",\"packageFamilyName\":\"pv\",\"displayName\":\"rylniofrzg\",\"packageRelativePath\":\"jed\",\"isRegularRegistration\":true,\"isActive\":true,\"packageDependencies\":[],\"version\":\"xbcuiiznkt\",\"lastUpdated\":\"2021-01-02T08:34:37Z\",\"packageApplications\":[]},\"id\":\"nv\",\"name\":\"dibmikostbzbkiwb\",\"type\":\"qnyophzfyls\"}"; + "{\"properties\":{\"imagePath\":\"vsqxfxjelgcmpzqj\",\"packageName\":\"hqxu\",\"packageFamilyName\":\"vcacoyv\",\"displayName\":\"bsizus\",\"packageRelativePath\":\"zlbscmnlziji\",\"isRegularRegistration\":true,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"lnwyvqkxr\",\"publisher\":\"lniylylyfwxz\",\"minVersion\":\"gqztwhghmupgx\"},{\"dependencyName\":\"tcdxabbujftaben\",\"publisher\":\"klqpx\",\"minVersion\":\"cafeddw\"},{\"dependencyName\":\"lzafwxu\",\"publisher\":\"nhgookrtalvnbw\",\"minVersion\":\"bemeluclvd\"},{\"dependencyName\":\"ukyrdnqodxahh\",\"publisher\":\"qfaqnvzoqg\",\"minVersion\":\"pem\"}],\"version\":\"gavsczuejd\",\"lastUpdated\":\"2021-07-06T15:50:57Z\",\"packageApplications\":[{\"appId\":\"h\",\"description\":\"homewjjstliu\",\"appUserModelID\":\"awmo\",\"friendlyName\":\"ancz\",\"iconImageName\":\"odrrslblxyd\"},{\"appId\":\"vvbxiwkgfbqljnq\",\"description\":\"ychocokulehu\",\"appUserModelID\":\"lrqff\",\"friendlyName\":\"eyu\",\"iconImageName\":\"phyjdxravj\"},{\"appId\":\"rxmrgchbapx\",\"description\":\"y\",\"appUserModelID\":\"j\",\"friendlyName\":\"ajb\",\"iconImageName\":\"cgduusio\"}]},\"id\":\"lev\",\"name\":\"mclujyxkyxlzgs\",\"type\":\"gkzz\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -62,17 +62,25 @@ public void testGetWithResponse() throws Exception { MsixPackage response = manager .msixPackages() - .getWithResponse("uwfmduragegizvc", "felisdjub", "gbqi", com.azure.core.util.Context.NONE) + .getWithResponse("xpjb", "ypsjoq", "jenkyh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("kbsazgak", response.imagePath()); - Assertions.assertEquals("cyrcmjdmspo", response.packageName()); - Assertions.assertEquals("pv", response.packageFamilyName()); - Assertions.assertEquals("rylniofrzg", response.displayName()); - Assertions.assertEquals("jed", response.packageRelativePath()); + Assertions.assertEquals("vsqxfxjelgcmpzqj", response.imagePath()); + Assertions.assertEquals("hqxu", response.packageName()); + Assertions.assertEquals("vcacoyv", response.packageFamilyName()); + Assertions.assertEquals("bsizus", response.displayName()); + Assertions.assertEquals("zlbscmnlziji", response.packageRelativePath()); Assertions.assertEquals(true, response.isRegularRegistration()); Assertions.assertEquals(true, response.isActive()); - Assertions.assertEquals("xbcuiiznkt", response.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-02T08:34:37Z"), response.lastUpdated()); + Assertions.assertEquals("lnwyvqkxr", response.packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("lniylylyfwxz", response.packageDependencies().get(0).publisher()); + Assertions.assertEquals("gqztwhghmupgx", response.packageDependencies().get(0).minVersion()); + Assertions.assertEquals("gavsczuejd", response.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-06T15:50:57Z"), response.lastUpdated()); + Assertions.assertEquals("h", response.packageApplications().get(0).appId()); + Assertions.assertEquals("homewjjstliu", response.packageApplications().get(0).description()); + Assertions.assertEquals("awmo", response.packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("ancz", response.packageApplications().get(0).friendlyName()); + Assertions.assertEquals("odrrslblxyd", response.packageApplications().get(0).iconImageName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListMockTests.java index 3662d0b02af5..ba2f906f4c40 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListMockTests.java @@ -32,7 +32,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"properties\":{\"imagePath\":\"xwaxfewzjkj\",\"packageName\":\"fdeqvhpsyl\",\"packageFamilyName\":\"shk\",\"displayName\":\"f\",\"packageRelativePath\":\"mxzjrgywwpgjx\",\"isRegularRegistration\":true,\"isActive\":false,\"packageDependencies\":[],\"version\":\"icgaao\",\"lastUpdated\":\"2021-09-03T16:23:29Z\",\"packageApplications\":[]},\"id\":\"qutdewemxs\",\"name\":\"vru\",\"type\":\"nz\"}]}"; + "{\"value\":[{\"properties\":{\"imagePath\":\"y\",\"packageName\":\"eseyqr\",\"packageFamilyName\":\"y\",\"displayName\":\"dotjvdk\",\"packageRelativePath\":\"swskuk\",\"isRegularRegistration\":false,\"isActive\":false,\"packageDependencies\":[{\"dependencyName\":\"spkxkdt\",\"publisher\":\"kndlqvtwknvg\",\"minVersion\":\"bugtywatmqa\"},{\"dependencyName\":\"ueatgroe\",\"publisher\":\"oygzcbyfqxkfao\",\"minVersion\":\"ehqpuvjmvqmt\"}],\"version\":\"ckygroejnndljdju\",\"lastUpdated\":\"2021-01-30T20:23Z\",\"packageApplications\":[{\"appId\":\"qyn\",\"description\":\"eysfaqegplw\",\"appUserModelID\":\"shwddkvbxgk\",\"friendlyName\":\"sybwptdaca\",\"iconImageName\":\"vlf\"}]},\"id\":\"mt\",\"name\":\"oiwenazerohzrsq\",\"type\":\"lsxkd\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -63,16 +63,25 @@ public void testList() throws Exception { PagedIterable response = manager .msixPackages() - .list("sihclafzvaylp", "rsqqwztcm", 544384144, false, 899185817, com.azure.core.util.Context.NONE); + .list("napfdqwowftpt", "uwjtks", 162312753, true, 585871352, com.azure.core.util.Context.NONE); - Assertions.assertEquals("xwaxfewzjkj", response.iterator().next().imagePath()); - Assertions.assertEquals("fdeqvhpsyl", response.iterator().next().packageName()); - Assertions.assertEquals("shk", response.iterator().next().packageFamilyName()); - Assertions.assertEquals("f", response.iterator().next().displayName()); - Assertions.assertEquals("mxzjrgywwpgjx", response.iterator().next().packageRelativePath()); - Assertions.assertEquals(true, response.iterator().next().isRegularRegistration()); + Assertions.assertEquals("y", response.iterator().next().imagePath()); + Assertions.assertEquals("eseyqr", response.iterator().next().packageName()); + Assertions.assertEquals("y", response.iterator().next().packageFamilyName()); + Assertions.assertEquals("dotjvdk", response.iterator().next().displayName()); + Assertions.assertEquals("swskuk", response.iterator().next().packageRelativePath()); + Assertions.assertEquals(false, response.iterator().next().isRegularRegistration()); Assertions.assertEquals(false, response.iterator().next().isActive()); - Assertions.assertEquals("icgaao", response.iterator().next().version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-03T16:23:29Z"), response.iterator().next().lastUpdated()); + Assertions.assertEquals("spkxkdt", response.iterator().next().packageDependencies().get(0).dependencyName()); + Assertions.assertEquals("kndlqvtwknvg", response.iterator().next().packageDependencies().get(0).publisher()); + Assertions.assertEquals("bugtywatmqa", response.iterator().next().packageDependencies().get(0).minVersion()); + Assertions.assertEquals("ckygroejnndljdju", response.iterator().next().version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-30T20:23Z"), response.iterator().next().lastUpdated()); + Assertions.assertEquals("qyn", response.iterator().next().packageApplications().get(0).appId()); + Assertions.assertEquals("eysfaqegplw", response.iterator().next().packageApplications().get(0).description()); + Assertions + .assertEquals("shwddkvbxgk", response.iterator().next().packageApplications().get(0).appUserModelId()); + Assertions.assertEquals("sybwptdaca", response.iterator().next().packageApplications().get(0).friendlyName()); + Assertions.assertEquals("vlf", response.iterator().next().packageApplications().get(0).iconImageName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationPropertiesTests.java index 723f8d3a9508..4a64716223f2 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationPropertiesTests.java @@ -17,11 +17,12 @@ public void testDeserialize() throws Exception { OperationProperties model = BinaryData .fromString( - "{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"ymglzufcyz\",\"displayName\":\"hdbihan\",\"blobDuration\":\"hfcbjysa\"},{\"name\":\"th\",\"displayName\":\"hab\",\"blobDuration\":\"pikxwczbyscnpqxu\"},{\"name\":\"vyq\",\"displayName\":\"wby\",\"blobDuration\":\"k\"},{\"name\":\"dumjgrtfwvuk\",\"displayName\":\"audccsnhs\",\"blobDuration\":\"nyejhkryhtnap\"}]}}") + "{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"th\",\"displayName\":\"hab\",\"blobDuration\":\"pikxwczbyscnpqxu\"}]}}") .toObject(OperationProperties.class); - Assertions.assertEquals("ymglzufcyz", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("hdbihan", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("hfcbjysa", model.serviceSpecification().logSpecifications().get(0).blobDuration()); + Assertions.assertEquals("th", model.serviceSpecification().logSpecifications().get(0).name()); + Assertions.assertEquals("hab", model.serviceSpecification().logSpecifications().get(0).displayName()); + Assertions + .assertEquals("pikxwczbyscnpqxu", model.serviceSpecification().logSpecifications().get(0).blobDuration()); } @org.junit.jupiter.api.Test @@ -33,22 +34,14 @@ public void testSerialize() throws Exception { .withLogSpecifications( Arrays .asList( - new LogSpecification() - .withName("ymglzufcyz") - .withDisplayName("hdbihan") - .withBlobDuration("hfcbjysa"), new LogSpecification() .withName("th") .withDisplayName("hab") - .withBlobDuration("pikxwczbyscnpqxu"), - new LogSpecification().withName("vyq").withDisplayName("wby").withBlobDuration("k"), - new LogSpecification() - .withName("dumjgrtfwvuk") - .withDisplayName("audccsnhs") - .withBlobDuration("nyejhkryhtnap")))); + .withBlobDuration("pikxwczbyscnpqxu")))); model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("ymglzufcyz", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("hdbihan", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("hfcbjysa", model.serviceSpecification().logSpecifications().get(0).blobDuration()); + Assertions.assertEquals("th", model.serviceSpecification().logSpecifications().get(0).name()); + Assertions.assertEquals("hab", model.serviceSpecification().logSpecifications().get(0).displayName()); + Assertions + .assertEquals("pikxwczbyscnpqxu", model.serviceSpecification().logSpecifications().get(0).blobDuration()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListMockTests.java index 5950edc4bad0..6a1374e24e74 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListMockTests.java @@ -32,7 +32,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"name\":\"eozphv\",\"display\":{\"provider\":\"y\",\"resource\":\"c\",\"operation\":\"upkvipmdsc\",\"description\":\"qupevzh\"},\"isDataAction\":true,\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[]}}}]}"; + "{\"value\":[{\"name\":\"vuzhyr\",\"display\":{\"provider\":\"ipmve\",\"resource\":\"xukuqgsj\",\"operation\":\"undxgketw\",\"description\":\"hzjhf\"},\"isDataAction\":true,\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"gpmuneqsxvmhfbuz\",\"displayName\":\"ihsasb\",\"blobDuration\":\"dyp\"}]}}}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -62,11 +62,37 @@ public void testList() throws Exception { PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("eozphv", response.iterator().next().name()); - Assertions.assertEquals("y", response.iterator().next().display().provider()); - Assertions.assertEquals("c", response.iterator().next().display().resource()); - Assertions.assertEquals("upkvipmdsc", response.iterator().next().display().operation()); - Assertions.assertEquals("qupevzh", response.iterator().next().display().description()); + Assertions.assertEquals("vuzhyr", response.iterator().next().name()); + Assertions.assertEquals("ipmve", response.iterator().next().display().provider()); + Assertions.assertEquals("xukuqgsj", response.iterator().next().display().resource()); + Assertions.assertEquals("undxgketw", response.iterator().next().display().operation()); + Assertions.assertEquals("hzjhf", response.iterator().next().display().description()); Assertions.assertEquals(true, response.iterator().next().isDataAction()); + Assertions + .assertEquals( + "gpmuneqsxvmhfbuz", + response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).name()); + Assertions + .assertEquals( + "ihsasb", + response + .iterator() + .next() + .properties() + .serviceSpecification() + .logSpecifications() + .get(0) + .displayName()); + Assertions + .assertEquals( + "dyp", + response + .iterator() + .next() + .properties() + .serviceSpecification() + .logSpecifications() + .get(0) + .blobDuration()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionListResultWithSystemDataTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionListResultWithSystemDataTests.java new file mode 100644 index 000000000000..90da69e1ea07 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionListResultWithSystemDataTests.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionListResultWithSystemData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionListResultWithSystemDataTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionListResultWithSystemData model = + BinaryData + .fromString( + "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"epgzgqexz\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"scpai\",\"actionsRequired\":\"hhbcsglummajtjao\"},\"provisioningState\":\"Failed\"},\"id\":\"bnbdxkqpxokajion\",\"name\":\"imexgstxgcpodgma\",\"type\":\"jrmvdjwzrlo\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"hijco\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"bzaqsqsycbkbfk\",\"actionsRequired\":\"kdkexxp\"},\"provisioningState\":\"Succeeded\"},\"id\":\"mxaxc\",\"name\":\"jpgd\",\"type\":\"toc\"}],\"nextLink\":\"xhvpmoue\"}") + .toObject(PrivateEndpointConnectionListResultWithSystemData.class); + Assertions + .assertEquals( + PrivateEndpointServiceConnectionStatus.APPROVED, + model.value().get(0).privateLinkServiceConnectionState().status()); + Assertions.assertEquals("scpai", model.value().get(0).privateLinkServiceConnectionState().description()); + Assertions + .assertEquals( + "hhbcsglummajtjao", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionListResultWithSystemData model = + new PrivateEndpointConnectionListResultWithSystemData() + .withValue( + Arrays + .asList( + new PrivateEndpointConnectionWithSystemDataInner() + .withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("scpai") + .withActionsRequired("hhbcsglummajtjao")), + new PrivateEndpointConnectionWithSystemDataInner() + .withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) + .withDescription("bzaqsqsycbkbfk") + .withActionsRequired("kdkexxp")))); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResultWithSystemData.class); + Assertions + .assertEquals( + PrivateEndpointServiceConnectionStatus.APPROVED, + model.value().get(0).privateLinkServiceConnectionState().status()); + Assertions.assertEquals("scpai", model.value().get(0).privateLinkServiceConnectionState().description()); + Assertions + .assertEquals( + "hhbcsglummajtjao", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionPropertiesTests.java new file mode 100644 index 000000000000..b5f23de2d3ac --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionPropertiesTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionProperties model = + BinaryData + .fromString( + "{\"privateEndpoint\":{\"id\":\"xklrypl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"asy\",\"actionsRequired\":\"nddhsgcbacph\"},\"provisioningState\":\"Succeeded\"}") + .toObject(PrivateEndpointConnectionProperties.class); + Assertions + .assertEquals( + PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("asy", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("nddhsgcbacph", model.privateLinkServiceConnectionState().actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionProperties model = + new PrivateEndpointConnectionProperties() + .withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) + .withDescription("asy") + .withActionsRequired("nddhsgcbacph")); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); + Assertions + .assertEquals( + PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("asy", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("nddhsgcbacph", model.privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionTests.java new file mode 100644 index 000000000000..9eeb10d0eda4 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnection model = + BinaryData + .fromString( + "{\"properties\":{\"privateEndpoint\":{\"id\":\"tqxhocdgeab\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"uticndvkaozwyif\",\"actionsRequired\":\"hxh\"},\"provisioningState\":\"Failed\"},\"id\":\"k\",\"name\":\"tyxolniwpwc\",\"type\":\"kjfkg\"}") + .toObject(PrivateEndpointConnection.class); + Assertions + .assertEquals( + PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("uticndvkaozwyif", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("hxh", model.privateLinkServiceConnectionState().actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnection model = + new PrivateEndpointConnection() + .withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) + .withDescription("uticndvkaozwyif") + .withActionsRequired("hxh")); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnection.class); + Assertions + .assertEquals( + PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("uticndvkaozwyif", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("hxh", model.privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionWithSystemDataInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionWithSystemDataInnerTests.java new file mode 100644 index 000000000000..4cec92a7ec25 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionWithSystemDataInnerTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionWithSystemDataInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionWithSystemDataInner model = + BinaryData + .fromString( + "{\"properties\":{\"privateEndpoint\":{\"id\":\"i\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"jnxqbzvddntwn\",\"actionsRequired\":\"icbtwnpzao\"},\"provisioningState\":\"Failed\"},\"id\":\"hrhcffcyddglmjth\",\"name\":\"qkwpyeicxmqc\",\"type\":\"wqvhkhixuigdt\"}") + .toObject(PrivateEndpointConnectionWithSystemDataInner.class); + Assertions + .assertEquals( + PrivateEndpointServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("jnxqbzvddntwn", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("icbtwnpzao", model.privateLinkServiceConnectionState().actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionWithSystemDataInner model = + new PrivateEndpointConnectionWithSystemDataInner() + .withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("jnxqbzvddntwn") + .withActionsRequired("icbtwnpzao")); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionWithSystemDataInner.class); + Assertions + .assertEquals( + PrivateEndpointServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("jnxqbzvddntwn", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("icbtwnpzao", model.privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolWithResponseMockTests.java new file mode 100644 index 000000000000..8b9e90820ea8 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolWithResponseMockTests.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class PrivateEndpointConnectionsDeleteByHostPoolWithResponseMockTests { + @Test + public void testDeleteByHostPoolWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr = "{}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito + .when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito + .when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito + .when(httpClient.send(httpRequest.capture(), Mockito.any())) + .thenReturn( + Mono + .defer( + () -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + DesktopVirtualizationManager manager = + DesktopVirtualizationManager + .configure() + .withHttpClient(httpClient) + .authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager + .privateEndpointConnections() + .deleteByHostPoolWithResponse("z", "owxeqocljmy", "vkzqk", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceWithResponseMockTests.java new file mode 100644 index 000000000000..acd3ab29585c --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceWithResponseMockTests.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class PrivateEndpointConnectionsDeleteByWorkspaceWithResponseMockTests { + @Test + public void testDeleteByWorkspaceWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr = "{}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito + .when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito + .when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito + .when(httpClient.send(httpRequest.capture(), Mockito.any())) + .thenReturn( + Mono + .defer( + () -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + DesktopVirtualizationManager manager = + DesktopVirtualizationManager + .configure() + .withHttpClient(httpClient) + .authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager + .privateEndpointConnections() + .deleteByWorkspaceWithResponse( + "fnmdxotn", "fdgugeyzi", "grkyuizabsnmfpph", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolWithResponseMockTests.java similarity index 56% rename from sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetWithResponseMockTests.java rename to sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolWithResponseMockTests.java index 50a7bb05774e..3549829ed2a9 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolWithResponseMockTests.java @@ -12,9 +12,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHost; -import com.azure.resourcemanager.desktopvirtualization.models.Status; -import com.azure.resourcemanager.desktopvirtualization.models.UpdateState; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -25,15 +24,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -public final class SessionHostsGetWithResponseMockTests { +public final class PrivateEndpointConnectionsGetByHostPoolWithResponseMockTests { @Test - public void testGetWithResponse() throws Exception { + public void testGetByHostPoolWithResponse() throws Exception { HttpClient httpClient = Mockito.mock(HttpClient.class); HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"objectId\":\"k\",\"lastHeartBeat\":\"2021-03-23T11:52:12Z\",\"sessions\":1942149440,\"agentVersion\":\"hlb\",\"allowNewSession\":true,\"virtualMachineId\":\"pcpil\",\"resourceId\":\"a\",\"assignedUser\":\"vechndbnwiehole\",\"friendlyName\":\"wiuub\",\"status\":\"Upgrading\",\"statusTimestamp\":\"2021-11-19T16:29:04Z\",\"osVersion\":\"ap\",\"sxSStackVersion\":\"tf\",\"updateState\":\"Started\",\"lastUpdateTime\":\"2021-03-29T04:36:42Z\",\"updateErrorMessage\":\"x\",\"sessionHostHealthCheckResults\":[]},\"id\":\"fxapjwogqqnobpu\",\"name\":\"cdabtqwpwya\",\"type\":\"bzasqbucljgkyexa\"}"; + "{\"properties\":{\"privateEndpoint\":{\"id\":\"ihsgq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"ohsdtmcd\",\"actionsRequired\":\"ufcohdxbz\"},\"provisioningState\":\"Deleting\"},\"id\":\"muapcvhdbevw\",\"name\":\"qxeysko\",\"type\":\"qzinkfkbg\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -61,22 +60,17 @@ public void testGetWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - SessionHost response = + PrivateEndpointConnectionWithSystemData response = manager - .sessionHosts() - .getWithResponse("hrbbpneqvcwwyy", "r", "ochpprpr", com.azure.core.util.Context.NONE) + .privateEndpointConnections() + .getByHostPoolWithResponse( + "jltfvnzcyjtotpv", "pvpbdbzqgqqiheds", "qwthmky", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-23T11:52:12Z"), response.lastHeartBeat()); - Assertions.assertEquals(1942149440, response.sessions()); - Assertions.assertEquals("hlb", response.agentVersion()); - Assertions.assertEquals(true, response.allowNewSession()); - Assertions.assertEquals("vechndbnwiehole", response.assignedUser()); - Assertions.assertEquals("wiuub", response.friendlyName()); - Assertions.assertEquals(Status.UPGRADING, response.status()); - Assertions.assertEquals("ap", response.osVersion()); - Assertions.assertEquals("tf", response.sxSStackVersion()); - Assertions.assertEquals(UpdateState.STARTED, response.updateState()); - Assertions.assertEquals("x", response.updateErrorMessage()); + Assertions + .assertEquals( + PrivateEndpointServiceConnectionStatus.REJECTED, response.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("ohsdtmcd", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("ufcohdxbz", response.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceWithResponseMockTests.java new file mode 100644 index 000000000000..4819c76babb5 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceWithResponseMockTests.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class PrivateEndpointConnectionsGetByWorkspaceWithResponseMockTests { + @Test + public void testGetByWorkspaceWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr = + "{\"properties\":{\"privateEndpoint\":{\"id\":\"brjtloqxfuoj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"flrzpas\",\"actionsRequired\":\"biuimzdlyjdfq\"},\"provisioningState\":\"Creating\"},\"id\":\"yoqufdvruz\",\"name\":\"lzo\",\"type\":\"hpc\"}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito + .when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito + .when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito + .when(httpClient.send(httpRequest.capture(), Mockito.any())) + .thenReturn( + Mono + .defer( + () -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + DesktopVirtualizationManager manager = + DesktopVirtualizationManager + .configure() + .withHttpClient(httpClient) + .authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PrivateEndpointConnectionWithSystemData response = + manager + .privateEndpointConnections() + .getByWorkspaceWithResponse("jjrcgegydc", "boxjumvq", "olihrra", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions + .assertEquals( + PrivateEndpointServiceConnectionStatus.APPROVED, response.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("flrzpas", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("biuimzdlyjdfq", response.privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolMockTests.java similarity index 53% rename from sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListMockTests.java rename to sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolMockTests.java index 71f6f6498f43..1abdeb56e325 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolMockTests.java @@ -13,9 +13,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHost; -import com.azure.resourcemanager.desktopvirtualization.models.Status; -import com.azure.resourcemanager.desktopvirtualization.models.UpdateState; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -26,15 +25,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -public final class SessionHostsListMockTests { +public final class PrivateEndpointConnectionsListByHostPoolMockTests { @Test - public void testList() throws Exception { + public void testListByHostPool() throws Exception { HttpClient httpClient = Mockito.mock(HttpClient.class); HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"properties\":{\"objectId\":\"koih\",\"lastHeartBeat\":\"2021-01-04T00:33:47Z\",\"sessions\":874789657,\"agentVersion\":\"lmljhlnymzotq\",\"allowNewSession\":true,\"virtualMachineId\":\"zcbmqqvxmvwf\",\"resourceId\":\"ayxonsupeujl\",\"assignedUser\":\"nh\",\"friendlyName\":\"sqltnzo\",\"status\":\"NeedsAssistance\",\"statusTimestamp\":\"2020-12-29T06:07:24Z\",\"osVersion\":\"nxfyqonm\",\"sxSStackVersion\":\"ox\",\"updateState\":\"Started\",\"lastUpdateTime\":\"2021-07-30T17:53:09Z\",\"updateErrorMessage\":\"xiqxeiiqbimh\",\"sessionHostHealthCheckResults\":[]},\"id\":\"winhehfqpo\",\"name\":\"vwbcblembnkbwv\",\"type\":\"vxkdivqihebwtswb\"}]}"; + "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"prot\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"ndm\",\"actionsRequired\":\"hu\"},\"provisioningState\":\"Failed\"},\"id\":\"jkavl\",\"name\":\"or\",\"type\":\"mftpmdtz\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -62,22 +61,17 @@ public void testList() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = + PagedIterable response = manager - .sessionHosts() - .list("s", "sphaivmxyasflvg", 1752644697, false, 826140742, com.azure.core.util.Context.NONE); + .privateEndpointConnections() + .listByHostPool( + "nustgnljh", "mgixhcmavmqfou", 308634203, false, 1053565042, com.azure.core.util.Context.NONE); Assertions - .assertEquals(OffsetDateTime.parse("2021-01-04T00:33:47Z"), response.iterator().next().lastHeartBeat()); - Assertions.assertEquals(874789657, response.iterator().next().sessions()); - Assertions.assertEquals("lmljhlnymzotq", response.iterator().next().agentVersion()); - Assertions.assertEquals(true, response.iterator().next().allowNewSession()); - Assertions.assertEquals("nh", response.iterator().next().assignedUser()); - Assertions.assertEquals("sqltnzo", response.iterator().next().friendlyName()); - Assertions.assertEquals(Status.NEEDS_ASSISTANCE, response.iterator().next().status()); - Assertions.assertEquals("nxfyqonm", response.iterator().next().osVersion()); - Assertions.assertEquals("ox", response.iterator().next().sxSStackVersion()); - Assertions.assertEquals(UpdateState.STARTED, response.iterator().next().updateState()); - Assertions.assertEquals("xiqxeiiqbimh", response.iterator().next().updateErrorMessage()); + .assertEquals( + PrivateEndpointServiceConnectionStatus.PENDING, + response.iterator().next().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("ndm", response.iterator().next().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("hu", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceMockTests.java new file mode 100644 index 000000000000..411f06b2986f --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceMockTests.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class PrivateEndpointConnectionsListByWorkspaceMockTests { + @Test + public void testListByWorkspace() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr = + "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"kjibnxmysuxswqrn\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"ijpstte\",\"actionsRequired\":\"qqpwcyyuf\"},\"provisioningState\":\"Failed\"},\"id\":\"uncuw\",\"name\":\"qspkcdqzhlctd\",\"type\":\"unqndyfpchrqb\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito + .when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito + .when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito + .when(httpClient.send(httpRequest.capture(), Mockito.any())) + .thenReturn( + Mono + .defer( + () -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + DesktopVirtualizationManager manager = + DesktopVirtualizationManager + .configure() + .withHttpClient(httpClient) + .authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = + manager + .privateEndpointConnections() + .listByWorkspace("yb", "wwpgdakchzyvlixq", com.azure.core.util.Context.NONE); + + Assertions + .assertEquals( + PrivateEndpointServiceConnectionStatus.PENDING, + response.iterator().next().privateLinkServiceConnectionState().status()); + Assertions + .assertEquals("ijpstte", response.iterator().next().privateLinkServiceConnectionState().description()); + Assertions + .assertEquals( + "qqpwcyyuf", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolWithResponseMockTests.java similarity index 51% rename from sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateWithResponseMockTests.java rename to sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolWithResponseMockTests.java index b06821fdd667..e17fdb8c0f00 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolWithResponseMockTests.java @@ -12,10 +12,11 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHost; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostPatch; -import com.azure.resourcemanager.desktopvirtualization.models.Status; -import com.azure.resourcemanager.desktopvirtualization.models.UpdateState; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -26,15 +27,15 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -public final class SessionHostsUpdateWithResponseMockTests { +public final class PrivateEndpointConnectionsUpdateByHostPoolWithResponseMockTests { @Test - public void testUpdateWithResponse() throws Exception { + public void testUpdateByHostPoolWithResponse() throws Exception { HttpClient httpClient = Mockito.mock(HttpClient.class); HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"objectId\":\"abzmifrygznmmaxr\",\"lastHeartBeat\":\"2021-09-23T07:11:23Z\",\"sessions\":1319720374,\"agentVersion\":\"gopxlhslnelxie\",\"allowNewSession\":false,\"virtualMachineId\":\"llxecwc\",\"resourceId\":\"jphslhcaw\",\"assignedUser\":\"tifdwfmvi\",\"friendlyName\":\"rqjb\",\"status\":\"Unavailable\",\"statusTimestamp\":\"2021-01-25T09:16:29Z\",\"osVersion\":\"glka\",\"sxSStackVersion\":\"onqjujeickpzvcpo\",\"updateState\":\"Started\",\"lastUpdateTime\":\"2021-06-08T11:40:30Z\",\"updateErrorMessage\":\"wcltyjede\",\"sessionHostHealthCheckResults\":[]},\"id\":\"lfmk\",\"name\":\"scazuawxtzxpu\",\"type\":\"mwabzxrvxc\"}"; + "{\"properties\":{\"privateEndpoint\":{\"id\":\"okayzejnhlbkp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"piljhahzvech\",\"actionsRequired\":\"bnwieholew\"},\"provisioningState\":\"Deleting\"},\"id\":\"uubw\",\"name\":\"fqsfa\",\"type\":\"aqtferr\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -62,31 +63,27 @@ public void testUpdateWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - SessionHost response = + PrivateEndpointConnectionWithSystemData response = manager - .sessionHosts() - .updateWithResponse( - "qnmcjngzqdqx", - "bjwgnyfus", - "zsvtuikzhajqgl", - false, - new SessionHostPatch() - .withAllowNewSession(false) - .withAssignedUser("qryxyn") - .withFriendlyName("zrdpsovwxznptgoe"), + .privateEndpointConnections() + .updateByHostPoolWithResponse( + "jeokbzefezrxccz", + "rtle", + "pqxbkwvzgnzvdf", + new PrivateEndpointConnection() + .withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) + .withDescription("jptmcgsbost") + .withActionsRequired("lnd")), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T07:11:23Z"), response.lastHeartBeat()); - Assertions.assertEquals(1319720374, response.sessions()); - Assertions.assertEquals("gopxlhslnelxie", response.agentVersion()); - Assertions.assertEquals(false, response.allowNewSession()); - Assertions.assertEquals("tifdwfmvi", response.assignedUser()); - Assertions.assertEquals("rqjb", response.friendlyName()); - Assertions.assertEquals(Status.UNAVAILABLE, response.status()); - Assertions.assertEquals("glka", response.osVersion()); - Assertions.assertEquals("onqjujeickpzvcpo", response.sxSStackVersion()); - Assertions.assertEquals(UpdateState.STARTED, response.updateState()); - Assertions.assertEquals("wcltyjede", response.updateErrorMessage()); + Assertions + .assertEquals( + PrivateEndpointServiceConnectionStatus.APPROVED, response.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("piljhahzvech", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("bnwieholew", response.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceWithResponseMockTests.java new file mode 100644 index 000000000000..950c3c717499 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceWithResponseMockTests.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class PrivateEndpointConnectionsUpdateByWorkspaceWithResponseMockTests { + @Test + public void testUpdateByWorkspaceWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr = + "{\"properties\":{\"privateEndpoint\":{\"id\":\"faey\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"fgvxirpghriypoqe\",\"actionsRequired\":\"lqhykprlpyz\"},\"provisioningState\":\"Creating\"},\"id\":\"iq\",\"name\":\"smexiitdf\",\"type\":\"xtyasiibmiyb\"}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito + .when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito + .when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito + .when(httpClient.send(httpRequest.capture(), Mockito.any())) + .thenReturn( + Mono + .defer( + () -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + DesktopVirtualizationManager manager = + DesktopVirtualizationManager + .configure() + .withHttpClient(httpClient) + .authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PrivateEndpointConnectionWithSystemData response = + manager + .privateEndpointConnections() + .updateByWorkspaceWithResponse( + "jee", + "yhyhsgzfczb", + "omfgbeglqgleohib", + new PrivateEndpointConnection() + .withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("acvbmqz") + .withActionsRequired("q")), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions + .assertEquals( + PrivateEndpointServiceConnectionStatus.APPROVED, response.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("fgvxirpghriypoqe", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("lqhykprlpyz", response.privateLinkServiceConnectionState().actionsRequired()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointTests.java new file mode 100644 index 000000000000..28988233d3a7 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; + +public final class PrivateEndpointTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"tynqgoul\"}").toObject(PrivateEndpoint.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpoint model = new PrivateEndpoint(); + model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourceInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourceInnerTests.java new file mode 100644 index 000000000000..ff4fefa3ff73 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourceInnerTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceInner model = + BinaryData + .fromString( + "{\"properties\":{\"groupId\":\"m\",\"requiredMembers\":[\"ofsx\"],\"requiredZoneNames\":[\"v\",\"bmqj\"]},\"id\":\"abcypmivk\",\"name\":\"lzu\",\"type\":\"ccfwnfnbacfion\"}") + .toObject(PrivateLinkResourceInner.class); + Assertions.assertEquals("v", model.requiredZoneNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkResourceInner model = + new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList("v", "bmqj")); + model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); + Assertions.assertEquals("v", model.requiredZoneNames().get(0)); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourceListResultTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourceListResultTests.java new file mode 100644 index 000000000000..384007368c65 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourceListResultTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResourceListResult; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceListResult model = + BinaryData + .fromString( + "{\"value\":[{\"properties\":{\"groupId\":\"joghmewuama\",\"requiredMembers\":[\"z\",\"yvvtpgvdfgio\"],\"requiredZoneNames\":[\"tutqxlngxlefgug\",\"xkrxdqmi\",\"tthzrvqd\",\"abhjybi\"]},\"id\":\"ehoqfbowskan\",\"name\":\"ktzlcuiywg\",\"type\":\"ywgndrv\"}],\"nextLink\":\"hzgpphrcgyncocpe\"}") + .toObject(PrivateLinkResourceListResult.class); + Assertions.assertEquals("tutqxlngxlefgug", model.value().get(0).requiredZoneNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkResourceListResult model = + new PrivateLinkResourceListResult() + .withValue( + Arrays + .asList( + new PrivateLinkResourceInner() + .withRequiredZoneNames( + Arrays.asList("tutqxlngxlefgug", "xkrxdqmi", "tthzrvqd", "abhjybi")))); + model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResult.class); + Assertions.assertEquals("tutqxlngxlefgug", model.value().get(0).requiredZoneNames().get(0)); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcePropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcePropertiesTests.java new file mode 100644 index 000000000000..8d54c2c6485d --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcePropertiesTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceProperties model = + BinaryData + .fromString( + "{\"groupId\":\"bxetqgtzxdpn\",\"requiredMembers\":[\"qwxrjfeallnw\"],\"requiredZoneNames\":[\"isnjampmngnz\",\"c\"]}") + .toObject(PrivateLinkResourceProperties.class); + Assertions.assertEquals("isnjampmngnz", model.requiredZoneNames().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkResourceProperties model = + new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("isnjampmngnz", "c")); + model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); + Assertions.assertEquals("isnjampmngnz", model.requiredZoneNames().get(0)); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolMockTests.java new file mode 100644 index 000000000000..310cc730aebd --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolMockTests.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResource; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class PrivateLinkResourcesListByHostPoolMockTests { + @Test + public void testListByHostPool() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr = + "{\"value\":[{\"properties\":{\"groupId\":\"sovwxznptgoeiyb\",\"requiredMembers\":[\"pfhvfslk\"],\"requiredZoneNames\":[\"jlrigjkskyrioovz\",\"dsxwaab\",\"mifrygznmma\"]},\"id\":\"ri\",\"name\":\"kzobgopxlhsln\",\"type\":\"lxieixynllxecwcr\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito + .when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito + .when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito + .when(httpClient.send(httpRequest.capture(), Mockito.any())) + .thenReturn( + Mono + .defer( + () -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + DesktopVirtualizationManager manager = + DesktopVirtualizationManager + .configure() + .withHttpClient(httpClient) + .authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = + manager + .privateLinkResources() + .listByHostPool("l", "qryxyn", 620085605, true, 356071455, com.azure.core.util.Context.NONE); + + Assertions.assertEquals("jlrigjkskyrioovz", response.iterator().next().requiredZoneNames().get(0)); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceMockTests.java new file mode 100644 index 000000000000..73f81c17a520 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceMockTests.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResource; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class PrivateLinkResourcesListByWorkspaceMockTests { + @Test + public void testListByWorkspace() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr = + "{\"value\":[{\"properties\":{\"groupId\":\"sqbuc\",\"requiredMembers\":[\"kyexaoguyaipi\",\"sdaultxij\",\"um\"],\"requiredZoneNames\":[\"azlnqnmcjngzqdqx\"]},\"id\":\"bjwgnyfus\",\"name\":\"zsvtuikzhajqgl\",\"type\":\"fh\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito + .when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito + .when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito + .when(httpClient.send(httpRequest.capture(), Mockito.any())) + .thenReturn( + Mono + .defer( + () -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + DesktopVirtualizationManager manager = + DesktopVirtualizationManager + .configure() + .withHttpClient(httpClient) + .authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = + manager + .privateLinkResources() + .listByWorkspace( + "wexjkmfxapjwogq", + "nobpudcdabtqwpw", + 2010443445, + true, + 1935612973, + com.azure.core.util.Context.NONE); + + Assertions.assertEquals("azlnqnmcjngzqdqx", response.iterator().next().requiredZoneNames().get(0)); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkServiceConnectionStateTests.java new file mode 100644 index 000000000000..19b55b77a5a3 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkServiceConnectionStateTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkServiceConnectionStateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkServiceConnectionState model = + BinaryData + .fromString("{\"status\":\"Approved\",\"description\":\"i\",\"actionsRequired\":\"yqkgfg\"}") + .toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); + Assertions.assertEquals("i", model.description()); + Assertions.assertEquals("yqkgfg", model.actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkServiceConnectionState model = + new PrivateLinkServiceConnectionState() + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("i") + .withActionsRequired("yqkgfg"); + model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); + Assertions.assertEquals("i", model.description()); + Assertions.assertEquals("yqkgfg", model.actionsRequired()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetIdentityTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetIdentityTests.java index 344ca256dc19..a0dff4b8f7ec 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetIdentityTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetIdentityTests.java @@ -14,7 +14,8 @@ public final class ResourceModelWithAllowedPropertySetIdentityTests { public void testDeserialize() throws Exception { ResourceModelWithAllowedPropertySetIdentity model = BinaryData - .fromString("{\"principalId\":\"rokft\",\"tenantId\":\"olniwpwcukjf\",\"type\":\"SystemAssigned\"}") + .fromString( + "{\"principalId\":\"uvfqawrlyxwj\",\"tenantId\":\"prbnwbxgjvtbv\",\"type\":\"SystemAssigned\"}") .toObject(ResourceModelWithAllowedPropertySetIdentity.class); Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetSkuTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetSkuTests.java index 336bd5471efa..a49af105d066 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetSkuTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetSkuTests.java @@ -15,29 +15,29 @@ public void testDeserialize() throws Exception { ResourceModelWithAllowedPropertySetSku model = BinaryData .fromString( - "{\"name\":\"dhsgcba\",\"tier\":\"Standard\",\"size\":\"jkot\",\"family\":\"qgoulznd\",\"capacity\":708367520}") + "{\"name\":\"muouqfp\",\"tier\":\"Free\",\"size\":\"bngui\",\"family\":\"wu\",\"capacity\":1403075438}") .toObject(ResourceModelWithAllowedPropertySetSku.class); - Assertions.assertEquals("dhsgcba", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("jkot", model.size()); - Assertions.assertEquals("qgoulznd", model.family()); - Assertions.assertEquals(708367520, model.capacity()); + Assertions.assertEquals("muouqfp", model.name()); + Assertions.assertEquals(SkuTier.FREE, model.tier()); + Assertions.assertEquals("bngui", model.size()); + Assertions.assertEquals("wu", model.family()); + Assertions.assertEquals(1403075438, model.capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ResourceModelWithAllowedPropertySetSku model = new ResourceModelWithAllowedPropertySetSku() - .withName("dhsgcba") - .withTier(SkuTier.STANDARD) - .withSize("jkot") - .withFamily("qgoulznd") - .withCapacity(708367520); + .withName("muouqfp") + .withTier(SkuTier.FREE) + .withSize("bngui") + .withFamily("wu") + .withCapacity(1403075438); model = BinaryData.fromObject(model).toObject(ResourceModelWithAllowedPropertySetSku.class); - Assertions.assertEquals("dhsgcba", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("jkot", model.size()); - Assertions.assertEquals("qgoulznd", model.family()); - Assertions.assertEquals(708367520, model.capacity()); + Assertions.assertEquals("muouqfp", model.name()); + Assertions.assertEquals(SkuTier.FREE, model.tier()); + Assertions.assertEquals("bngui", model.size()); + Assertions.assertEquals("wu", model.family()); + Assertions.assertEquals(1403075438, model.capacity()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationDisplayTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationDisplayTests.java index 08355da32803..eecce71c09a8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationDisplayTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationDisplayTests.java @@ -14,26 +14,26 @@ public void testDeserialize() throws Exception { ResourceProviderOperationDisplay model = BinaryData .fromString( - "{\"provider\":\"mparcryuanzw\",\"resource\":\"zdxtayrlhmwhf\",\"operation\":\"rqobmtuk\",\"description\":\"ryrtihfxtijbpzv\"}") + "{\"provider\":\"ryrtihfxtijbpzv\",\"resource\":\"wzsymglzufcy\",\"operation\":\"ohdbihanufh\",\"description\":\"bj\"}") .toObject(ResourceProviderOperationDisplay.class); - Assertions.assertEquals("mparcryuanzw", model.provider()); - Assertions.assertEquals("zdxtayrlhmwhf", model.resource()); - Assertions.assertEquals("rqobmtuk", model.operation()); - Assertions.assertEquals("ryrtihfxtijbpzv", model.description()); + Assertions.assertEquals("ryrtihfxtijbpzv", model.provider()); + Assertions.assertEquals("wzsymglzufcy", model.resource()); + Assertions.assertEquals("ohdbihanufh", model.operation()); + Assertions.assertEquals("bj", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ResourceProviderOperationDisplay model = new ResourceProviderOperationDisplay() - .withProvider("mparcryuanzw") - .withResource("zdxtayrlhmwhf") - .withOperation("rqobmtuk") - .withDescription("ryrtihfxtijbpzv"); + .withProvider("ryrtihfxtijbpzv") + .withResource("wzsymglzufcy") + .withOperation("ohdbihanufh") + .withDescription("bj"); model = BinaryData.fromObject(model).toObject(ResourceProviderOperationDisplay.class); - Assertions.assertEquals("mparcryuanzw", model.provider()); - Assertions.assertEquals("zdxtayrlhmwhf", model.resource()); - Assertions.assertEquals("rqobmtuk", model.operation()); - Assertions.assertEquals("ryrtihfxtijbpzv", model.description()); + Assertions.assertEquals("ryrtihfxtijbpzv", model.provider()); + Assertions.assertEquals("wzsymglzufcy", model.resource()); + Assertions.assertEquals("ohdbihanufh", model.operation()); + Assertions.assertEquals("bj", model.description()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationInnerTests.java index ea39f8dd896f..50d45216eaf7 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationInnerTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationInnerTests.java @@ -6,6 +6,7 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.ResourceProviderOperationInner; +import com.azure.resourcemanager.desktopvirtualization.models.LogSpecification; import com.azure.resourcemanager.desktopvirtualization.models.OperationProperties; import com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationDisplay; import com.azure.resourcemanager.desktopvirtualization.models.ServiceSpecification; @@ -18,7 +19,7 @@ public void testDeserialize() throws Exception { ResourceProviderOperationInner model = BinaryData .fromString( - "{\"name\":\"jddeqsrdeupewnw\",\"display\":{\"provider\":\"tjzyflus\",\"resource\":\"hmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"isDataAction\":false,\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[]}}}") + "{\"name\":\"jddeqsrdeupewnw\",\"display\":{\"provider\":\"tjzyflus\",\"resource\":\"hmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"isDataAction\":false,\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"mparcryuanzw\",\"displayName\":\"zdxtayrlhmwhf\",\"blobDuration\":\"rqobmtuk\"}]}}}") .toObject(ResourceProviderOperationInner.class); Assertions.assertEquals("jddeqsrdeupewnw", model.name()); Assertions.assertEquals("tjzyflus", model.display().provider()); @@ -26,6 +27,14 @@ public void testDeserialize() throws Exception { Assertions.assertEquals("smy", model.display().operation()); Assertions.assertEquals("kdtmlxhekuk", model.display().description()); Assertions.assertEquals(false, model.isDataAction()); + Assertions + .assertEquals("mparcryuanzw", model.properties().serviceSpecification().logSpecifications().get(0).name()); + Assertions + .assertEquals( + "zdxtayrlhmwhf", model.properties().serviceSpecification().logSpecifications().get(0).displayName()); + Assertions + .assertEquals( + "rqobmtuk", model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); } @org.junit.jupiter.api.Test @@ -42,7 +51,15 @@ public void testSerialize() throws Exception { .withIsDataAction(false) .withProperties( new OperationProperties() - .withServiceSpecification(new ServiceSpecification().withLogSpecifications(Arrays.asList()))); + .withServiceSpecification( + new ServiceSpecification() + .withLogSpecifications( + Arrays + .asList( + new LogSpecification() + .withName("mparcryuanzw") + .withDisplayName("zdxtayrlhmwhf") + .withBlobDuration("rqobmtuk"))))); model = BinaryData.fromObject(model).toObject(ResourceProviderOperationInner.class); Assertions.assertEquals("jddeqsrdeupewnw", model.name()); Assertions.assertEquals("tjzyflus", model.display().provider()); @@ -50,5 +67,13 @@ public void testSerialize() throws Exception { Assertions.assertEquals("smy", model.display().operation()); Assertions.assertEquals("kdtmlxhekuk", model.display().description()); Assertions.assertEquals(false, model.isDataAction()); + Assertions + .assertEquals("mparcryuanzw", model.properties().serviceSpecification().logSpecifications().get(0).name()); + Assertions + .assertEquals( + "zdxtayrlhmwhf", model.properties().serviceSpecification().logSpecifications().get(0).displayName()); + Assertions + .assertEquals( + "rqobmtuk", model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationListTests.java index 09ab5dfc573a..e4131c6ffa54 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationListTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationListTests.java @@ -6,9 +6,11 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.ResourceProviderOperationInner; +import com.azure.resourcemanager.desktopvirtualization.models.LogSpecification; import com.azure.resourcemanager.desktopvirtualization.models.OperationProperties; import com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationDisplay; import com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationList; +import com.azure.resourcemanager.desktopvirtualization.models.ServiceSpecification; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -18,7 +20,7 @@ public void testDeserialize() throws Exception { ResourceProviderOperationList model = BinaryData .fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"isDataAction\":false,\"properties\":{}},{\"name\":\"izhwlrxy\",\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"isDataAction\":true,\"properties\":{}},{\"name\":\"esaagdfm\",\"display\":{\"provider\":\"lhjxr\",\"resource\":\"kwm\",\"operation\":\"ktsizntocipaou\",\"description\":\"psqucmpoyf\"},\"isDataAction\":true,\"properties\":{}}],\"nextLink\":\"nygj\"}") + "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"isDataAction\":false,\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}]}}},{\"name\":\"hwlrx\",\"display\":{\"provider\":\"soqijg\",\"resource\":\"mbpazlobcufpdzn\",\"operation\":\"t\",\"description\":\"qjnqglhqgnufoooj\"},\"isDataAction\":true,\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}]}}},{\"name\":\"aagdfmg\",\"display\":{\"provider\":\"hjxri\",\"resource\":\"wmrvktsizntocipa\",\"operation\":\"ajpsquc\",\"description\":\"o\"},\"isDataAction\":false,\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{},{},{}]}}}],\"nextLink\":\"nygj\"}") .toObject(ResourceProviderOperationList.class); Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); @@ -44,27 +46,47 @@ public void testSerialize() throws Exception { .withOperation("hdxbmtqio") .withDescription("zehtbmu")) .withIsDataAction(false) - .withProperties(new OperationProperties()), + .withProperties( + new OperationProperties() + .withServiceSpecification( + new ServiceSpecification() + .withLogSpecifications( + Arrays.asList(new LogSpecification(), new LogSpecification())))), new ResourceProviderOperationInner() - .withName("izhwlrxy") + .withName("hwlrx") .withDisplay( new ResourceProviderOperationDisplay() - .withProvider("oqijgkdmbpaz") - .withResource("bc") - .withOperation("pdznrbtcqqjnqgl") - .withDescription("gnufoooj")) + .withProvider("soqijg") + .withResource("mbpazlobcufpdzn") + .withOperation("t") + .withDescription("qjnqglhqgnufoooj")) .withIsDataAction(true) - .withProperties(new OperationProperties()), + .withProperties( + new OperationProperties() + .withServiceSpecification( + new ServiceSpecification() + .withLogSpecifications( + Arrays.asList(new LogSpecification(), new LogSpecification())))), new ResourceProviderOperationInner() - .withName("esaagdfm") + .withName("aagdfmg") .withDisplay( new ResourceProviderOperationDisplay() - .withProvider("lhjxr") - .withResource("kwm") - .withOperation("ktsizntocipaou") - .withDescription("psqucmpoyf")) - .withIsDataAction(true) - .withProperties(new OperationProperties()))); + .withProvider("hjxri") + .withResource("wmrvktsizntocipa") + .withOperation("ajpsquc") + .withDescription("o")) + .withIsDataAction(false) + .withProperties( + new OperationProperties() + .withServiceSpecification( + new ServiceSpecification() + .withLogSpecifications( + Arrays + .asList( + new LogSpecification(), + new LogSpecification(), + new LogSpecification(), + new LogSpecification())))))); model = BinaryData.fromObject(model).toObject(ResourceProviderOperationList.class); Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingHostPoolReferenceTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingHostPoolReferenceTests.java index dd7d1a941d8d..f416874c518d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingHostPoolReferenceTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingHostPoolReferenceTests.java @@ -13,18 +13,18 @@ public final class ScalingHostPoolReferenceTests { public void testDeserialize() throws Exception { ScalingHostPoolReference model = BinaryData - .fromString("{\"hostPoolArmPath\":\"pusuesn\",\"scalingPlanEnabled\":false}") + .fromString("{\"hostPoolArmPath\":\"yav\",\"scalingPlanEnabled\":false}") .toObject(ScalingHostPoolReference.class); - Assertions.assertEquals("pusuesn", model.hostPoolArmPath()); + Assertions.assertEquals("yav", model.hostPoolArmPath()); Assertions.assertEquals(false, model.scalingPlanEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScalingHostPoolReference model = - new ScalingHostPoolReference().withHostPoolArmPath("pusuesn").withScalingPlanEnabled(false); + new ScalingHostPoolReference().withHostPoolArmPath("yav").withScalingPlanEnabled(false); model = BinaryData.fromObject(model).toObject(ScalingHostPoolReference.class); - Assertions.assertEquals("pusuesn", model.hostPoolArmPath()); + Assertions.assertEquals("yav", model.hostPoolArmPath()); Assertions.assertEquals(false, model.scalingPlanEnabled()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchPropertiesTests.java index f0af7c955d35..95fff0227cac 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchPropertiesTests.java @@ -21,124 +21,173 @@ public void testDeserialize() throws Exception { ScalingPlanPatchProperties model = BinaryData .fromString( - "{\"description\":\"sfcpkvxodpuozm\",\"friendlyName\":\"ydagfuaxbe\",\"timeZone\":\"iu\",\"exclusionTag\":\"ktwh\",\"schedules\":[{\"name\":\"zywqsmbsu\",\"daysOfWeek\":[\"Saturday\"],\"rampUpStartTime\":{\"hour\":26085617,\"minute\":1115871957},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":994913433,\"rampUpCapacityThresholdPct\":908271116,\"peakStartTime\":{\"hour\":57544677,\"minute\":1510965337},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":376493890,\"minute\":830050857},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":980316888,\"rampDownCapacityThresholdPct\":1173289641,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":1867202070,\"rampDownNotificationMessage\":\"rrqnbpoczvyifqrv\",\"offPeakStartTime\":{\"hour\":983918139,\"minute\":1867018963},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"}],\"hostPoolReferences\":[{\"hostPoolArmPath\":\"vvdfwatkpnpul\",\"scalingPlanEnabled\":true}]}") + "{\"description\":\"axdbabph\",\"friendlyName\":\"rqlfktsthsucocmn\",\"timeZone\":\"azt\",\"exclusionTag\":\"twwrqp\",\"schedules\":[{\"name\":\"kzywbiex\",\"daysOfWeek\":[\"Monday\",\"Saturday\",\"Tuesday\",\"Thursday\"],\"rampUpStartTime\":{\"hour\":537783371,\"minute\":712970145},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":1757218598,\"rampUpCapacityThresholdPct\":954772002,\"peakStartTime\":{\"hour\":913520848,\"minute\":2089644825},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":1122495677,\"minute\":978941807},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1637273093,\"rampDownCapacityThresholdPct\":556709719,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":539118010,\"rampDownNotificationMessage\":\"xrhdwbavxbniwdjs\",\"offPeakStartTime\":{\"hour\":1721819579,\"minute\":44682703},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},{\"name\":\"gnxytxhpzxbz\",\"daysOfWeek\":[\"Tuesday\",\"Saturday\",\"Sunday\"],\"rampUpStartTime\":{\"hour\":687811406,\"minute\":2112719993},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":1070511980,\"rampUpCapacityThresholdPct\":767485321,\"peakStartTime\":{\"hour\":683096645,\"minute\":228169976},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":1091212098,\"minute\":1229662931},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":507562638,\"rampDownCapacityThresholdPct\":1271650742,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":338198941,\"rampDownNotificationMessage\":\"osvmk\",\"offPeakStartTime\":{\"hour\":979826416,\"minute\":941863244},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},{\"name\":\"kfplgmgsxnk\",\"daysOfWeek\":[\"Friday\"],\"rampUpStartTime\":{\"hour\":1802573976,\"minute\":1649575445},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":909915522,\"rampUpCapacityThresholdPct\":566835679,\"peakStartTime\":{\"hour\":1665401728,\"minute\":1601345404},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":2017228559,\"minute\":1973154307},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":1060544654,\"rampDownCapacityThresholdPct\":413325201,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":1370468424,\"rampDownNotificationMessage\":\"nyqupedeojnabck\",\"offPeakStartTime\":{\"hour\":598884844,\"minute\":611656940},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"}],\"hostPoolReferences\":[{\"hostPoolArmPath\":\"btfhvpesaps\",\"scalingPlanEnabled\":false}]}") .toObject(ScalingPlanPatchProperties.class); - Assertions.assertEquals("sfcpkvxodpuozm", model.description()); - Assertions.assertEquals("ydagfuaxbe", model.friendlyName()); - Assertions.assertEquals("iu", model.timeZone()); - Assertions.assertEquals("ktwh", model.exclusionTag()); - Assertions.assertEquals("zywqsmbsu", model.schedules().get(0).name()); - Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.SATURDAY, model.schedules().get(0).daysOfWeek().get(0)); - Assertions.assertEquals(26085617, model.schedules().get(0).rampUpStartTime().hour()); - Assertions.assertEquals(1115871957, model.schedules().get(0).rampUpStartTime().minute()); + Assertions.assertEquals("axdbabph", model.description()); + Assertions.assertEquals("rqlfktsthsucocmn", model.friendlyName()); + Assertions.assertEquals("azt", model.timeZone()); + Assertions.assertEquals("twwrqp", model.exclusionTag()); + Assertions.assertEquals("kzywbiex", model.schedules().get(0).name()); + Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.MONDAY, model.schedules().get(0).daysOfWeek().get(0)); + Assertions.assertEquals(537783371, model.schedules().get(0).rampUpStartTime().hour()); + Assertions.assertEquals(712970145, model.schedules().get(0).rampUpStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.schedules().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(994913433, model.schedules().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(908271116, model.schedules().get(0).rampUpCapacityThresholdPct()); - Assertions.assertEquals(57544677, model.schedules().get(0).peakStartTime().hour()); - Assertions.assertEquals(1510965337, model.schedules().get(0).peakStartTime().minute()); + Assertions.assertEquals(1757218598, model.schedules().get(0).rampUpMinimumHostsPct()); + Assertions.assertEquals(954772002, model.schedules().get(0).rampUpCapacityThresholdPct()); + Assertions.assertEquals(913520848, model.schedules().get(0).peakStartTime().hour()); + Assertions.assertEquals(2089644825, model.schedules().get(0).peakStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); - Assertions.assertEquals(376493890, model.schedules().get(0).rampDownStartTime().hour()); - Assertions.assertEquals(830050857, model.schedules().get(0).rampDownStartTime().minute()); + Assertions.assertEquals(1122495677, model.schedules().get(0).rampDownStartTime().hour()); + Assertions.assertEquals(978941807, model.schedules().get(0).rampDownStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(980316888, model.schedules().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(1173289641, model.schedules().get(0).rampDownCapacityThresholdPct()); + Assertions.assertEquals(1637273093, model.schedules().get(0).rampDownMinimumHostsPct()); + Assertions.assertEquals(556709719, model.schedules().get(0).rampDownCapacityThresholdPct()); Assertions.assertEquals(false, model.schedules().get(0).rampDownForceLogoffUsers()); Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(1867202070, model.schedules().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("rrqnbpoczvyifqrv", model.schedules().get(0).rampDownNotificationMessage()); - Assertions.assertEquals(983918139, model.schedules().get(0).offPeakStartTime().hour()); - Assertions.assertEquals(1867018963, model.schedules().get(0).offPeakStartTime().minute()); + Assertions.assertEquals(539118010, model.schedules().get(0).rampDownWaitTimeMinutes()); + Assertions.assertEquals("xrhdwbavxbniwdjs", model.schedules().get(0).rampDownNotificationMessage()); + Assertions.assertEquals(1721819579, model.schedules().get(0).offPeakStartTime().hour()); + Assertions.assertEquals(44682703, model.schedules().get(0).offPeakStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("vvdfwatkpnpul", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(true, model.hostPoolReferences().get(0).scalingPlanEnabled()); + Assertions.assertEquals("btfhvpesaps", model.hostPoolReferences().get(0).hostPoolArmPath()); + Assertions.assertEquals(false, model.hostPoolReferences().get(0).scalingPlanEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScalingPlanPatchProperties model = new ScalingPlanPatchProperties() - .withDescription("sfcpkvxodpuozm") - .withFriendlyName("ydagfuaxbe") - .withTimeZone("iu") - .withExclusionTag("ktwh") + .withDescription("axdbabph") + .withFriendlyName("rqlfktsthsucocmn") + .withTimeZone("azt") + .withExclusionTag("twwrqp") .withSchedules( Arrays .asList( new ScalingSchedule() - .withName("zywqsmbsu") - .withDaysOfWeek(Arrays.asList(ScalingScheduleDaysOfWeekItem.SATURDAY)) - .withRampUpStartTime(new Time().withHour(26085617).withMinute(1115871957)) + .withName("kzywbiex") + .withDaysOfWeek( + Arrays + .asList( + ScalingScheduleDaysOfWeekItem.MONDAY, + ScalingScheduleDaysOfWeekItem.SATURDAY, + ScalingScheduleDaysOfWeekItem.TUESDAY, + ScalingScheduleDaysOfWeekItem.THURSDAY)) + .withRampUpStartTime(new Time().withHour(537783371).withMinute(712970145)) .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(994913433) - .withRampUpCapacityThresholdPct(908271116) - .withPeakStartTime(new Time().withHour(57544677).withMinute(1510965337)) + .withRampUpMinimumHostsPct(1757218598) + .withRampUpCapacityThresholdPct(954772002) + .withPeakStartTime(new Time().withHour(913520848).withMinute(2089644825)) .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(376493890).withMinute(830050857)) + .withRampDownStartTime(new Time().withHour(1122495677).withMinute(978941807)) .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(980316888) - .withRampDownCapacityThresholdPct(1173289641) + .withRampDownMinimumHostsPct(1637273093) + .withRampDownCapacityThresholdPct(556709719) .withRampDownForceLogoffUsers(false) .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(1867202070) - .withRampDownNotificationMessage("rrqnbpoczvyifqrv") - .withOffPeakStartTime(new Time().withHour(983918139).withMinute(1867018963)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST))) + .withRampDownWaitTimeMinutes(539118010) + .withRampDownNotificationMessage("xrhdwbavxbniwdjs") + .withOffPeakStartTime(new Time().withHour(1721819579).withMinute(44682703)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), + new ScalingSchedule() + .withName("gnxytxhpzxbz") + .withDaysOfWeek( + Arrays + .asList( + ScalingScheduleDaysOfWeekItem.TUESDAY, + ScalingScheduleDaysOfWeekItem.SATURDAY, + ScalingScheduleDaysOfWeekItem.SUNDAY)) + .withRampUpStartTime(new Time().withHour(687811406).withMinute(2112719993)) + .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampUpMinimumHostsPct(1070511980) + .withRampUpCapacityThresholdPct(767485321) + .withPeakStartTime(new Time().withHour(683096645).withMinute(228169976)) + .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampDownStartTime(new Time().withHour(1091212098).withMinute(1229662931)) + .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownMinimumHostsPct(507562638) + .withRampDownCapacityThresholdPct(1271650742) + .withRampDownForceLogoffUsers(false) + .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) + .withRampDownWaitTimeMinutes(338198941) + .withRampDownNotificationMessage("osvmk") + .withOffPeakStartTime(new Time().withHour(979826416).withMinute(941863244)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST), + new ScalingSchedule() + .withName("kfplgmgsxnk") + .withDaysOfWeek(Arrays.asList(ScalingScheduleDaysOfWeekItem.FRIDAY)) + .withRampUpStartTime(new Time().withHour(1802573976).withMinute(1649575445)) + .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampUpMinimumHostsPct(909915522) + .withRampUpCapacityThresholdPct(566835679) + .withPeakStartTime(new Time().withHour(1665401728).withMinute(1601345404)) + .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampDownStartTime(new Time().withHour(2017228559).withMinute(1973154307)) + .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampDownMinimumHostsPct(1060544654) + .withRampDownCapacityThresholdPct(413325201) + .withRampDownForceLogoffUsers(false) + .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) + .withRampDownWaitTimeMinutes(1370468424) + .withRampDownNotificationMessage("nyqupedeojnabck") + .withOffPeakStartTime(new Time().withHour(598884844).withMinute(611656940)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST))) .withHostPoolReferences( Arrays .asList( new ScalingHostPoolReference() - .withHostPoolArmPath("vvdfwatkpnpul") - .withScalingPlanEnabled(true))); + .withHostPoolArmPath("btfhvpesaps") + .withScalingPlanEnabled(false))); model = BinaryData.fromObject(model).toObject(ScalingPlanPatchProperties.class); - Assertions.assertEquals("sfcpkvxodpuozm", model.description()); - Assertions.assertEquals("ydagfuaxbe", model.friendlyName()); - Assertions.assertEquals("iu", model.timeZone()); - Assertions.assertEquals("ktwh", model.exclusionTag()); - Assertions.assertEquals("zywqsmbsu", model.schedules().get(0).name()); - Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.SATURDAY, model.schedules().get(0).daysOfWeek().get(0)); - Assertions.assertEquals(26085617, model.schedules().get(0).rampUpStartTime().hour()); - Assertions.assertEquals(1115871957, model.schedules().get(0).rampUpStartTime().minute()); + Assertions.assertEquals("axdbabph", model.description()); + Assertions.assertEquals("rqlfktsthsucocmn", model.friendlyName()); + Assertions.assertEquals("azt", model.timeZone()); + Assertions.assertEquals("twwrqp", model.exclusionTag()); + Assertions.assertEquals("kzywbiex", model.schedules().get(0).name()); + Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.MONDAY, model.schedules().get(0).daysOfWeek().get(0)); + Assertions.assertEquals(537783371, model.schedules().get(0).rampUpStartTime().hour()); + Assertions.assertEquals(712970145, model.schedules().get(0).rampUpStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.schedules().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(994913433, model.schedules().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(908271116, model.schedules().get(0).rampUpCapacityThresholdPct()); - Assertions.assertEquals(57544677, model.schedules().get(0).peakStartTime().hour()); - Assertions.assertEquals(1510965337, model.schedules().get(0).peakStartTime().minute()); + Assertions.assertEquals(1757218598, model.schedules().get(0).rampUpMinimumHostsPct()); + Assertions.assertEquals(954772002, model.schedules().get(0).rampUpCapacityThresholdPct()); + Assertions.assertEquals(913520848, model.schedules().get(0).peakStartTime().hour()); + Assertions.assertEquals(2089644825, model.schedules().get(0).peakStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); - Assertions.assertEquals(376493890, model.schedules().get(0).rampDownStartTime().hour()); - Assertions.assertEquals(830050857, model.schedules().get(0).rampDownStartTime().minute()); + Assertions.assertEquals(1122495677, model.schedules().get(0).rampDownStartTime().hour()); + Assertions.assertEquals(978941807, model.schedules().get(0).rampDownStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(980316888, model.schedules().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(1173289641, model.schedules().get(0).rampDownCapacityThresholdPct()); + Assertions.assertEquals(1637273093, model.schedules().get(0).rampDownMinimumHostsPct()); + Assertions.assertEquals(556709719, model.schedules().get(0).rampDownCapacityThresholdPct()); Assertions.assertEquals(false, model.schedules().get(0).rampDownForceLogoffUsers()); Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(1867202070, model.schedules().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("rrqnbpoczvyifqrv", model.schedules().get(0).rampDownNotificationMessage()); - Assertions.assertEquals(983918139, model.schedules().get(0).offPeakStartTime().hour()); - Assertions.assertEquals(1867018963, model.schedules().get(0).offPeakStartTime().minute()); + Assertions.assertEquals(539118010, model.schedules().get(0).rampDownWaitTimeMinutes()); + Assertions.assertEquals("xrhdwbavxbniwdjs", model.schedules().get(0).rampDownNotificationMessage()); + Assertions.assertEquals(1721819579, model.schedules().get(0).offPeakStartTime().hour()); + Assertions.assertEquals(44682703, model.schedules().get(0).offPeakStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("vvdfwatkpnpul", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(true, model.hostPoolReferences().get(0).scalingPlanEnabled()); + Assertions.assertEquals("btfhvpesaps", model.hostPoolReferences().get(0).hostPoolArmPath()); + Assertions.assertEquals(false, model.hostPoolReferences().get(0).scalingPlanEnabled()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchTests.java index 098d934ed761..fa499c36509c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchTests.java @@ -8,8 +8,10 @@ import com.azure.resourcemanager.desktopvirtualization.models.ScalingHostPoolReference; import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPatch; import com.azure.resourcemanager.desktopvirtualization.models.ScalingSchedule; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingScheduleDaysOfWeekItem; import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; +import com.azure.resourcemanager.desktopvirtualization.models.Time; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -21,119 +23,210 @@ public void testDeserialize() throws Exception { ScalingPlanPatch model = BinaryData .fromString( - "{\"tags\":{\"xzdmohctb\":\"bavo\",\"ndnvo\":\"vudwx\",\"lazjdyggdtjixhbk\":\"gujjugwdkcglh\"},\"properties\":{\"description\":\"qweykhmenev\",\"friendlyName\":\"exfwhy\",\"timeZone\":\"i\",\"exclusionTag\":\"yvdcsitynnaa\",\"schedules\":[{\"name\":\"tehfiqscjeypvh\",\"daysOfWeek\":[],\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":693587344,\"rampUpCapacityThresholdPct\":1290040732,\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":509090660,\"rampDownCapacityThresholdPct\":545322213,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":1069395538,\"rampDownNotificationMessage\":\"qjpkcattpngjcrc\",\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},{\"name\":\"jh\",\"daysOfWeek\":[],\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":1964386727,\"rampUpCapacityThresholdPct\":1223642392,\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":904416760,\"rampDownCapacityThresholdPct\":389510865,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":1111397810,\"rampDownNotificationMessage\":\"ltrpmopj\",\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"}],\"hostPoolReferences\":[{\"hostPoolArmPath\":\"kthfui\",\"scalingPlanEnabled\":true}]}}") + "{\"tags\":{\"cukoklyaxuconu\":\"nmmqhgyxzkon\",\"pewr\":\"szfkbe\"},\"properties\":{\"description\":\"wv\",\"friendlyName\":\"ektcxsen\",\"timeZone\":\"lrsf\",\"exclusionTag\":\"zpwv\",\"schedules\":[{\"name\":\"gbiqylihkaet\",\"daysOfWeek\":[\"Thursday\",\"Thursday\",\"Sunday\"],\"rampUpStartTime\":{\"hour\":493965696,\"minute\":533172139},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":1486569340,\"rampUpCapacityThresholdPct\":5394429,\"peakStartTime\":{\"hour\":1059821653,\"minute\":2064900799},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":1887113058,\"minute\":1657324555},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1278137451,\"rampDownCapacityThresholdPct\":156873727,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":112236140,\"rampDownNotificationMessage\":\"txfvjrbirph\",\"offPeakStartTime\":{\"hour\":1482882841,\"minute\":99482426},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},{\"name\":\"hfnljkyq\",\"daysOfWeek\":[\"Saturday\",\"Thursday\"],\"rampUpStartTime\":{\"hour\":1054022835,\"minute\":1970519416},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":552165564,\"rampUpCapacityThresholdPct\":2084359484,\"peakStartTime\":{\"hour\":10143119,\"minute\":1108075171},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":649555961,\"minute\":1685542215},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1059812914,\"rampDownCapacityThresholdPct\":1745548413,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":630804167,\"rampDownNotificationMessage\":\"zz\",\"offPeakStartTime\":{\"hour\":1537141479,\"minute\":1755265349},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},{\"name\":\"fvgxbfsmxneh\",\"daysOfWeek\":[\"Wednesday\",\"Wednesday\",\"Sunday\",\"Sunday\"],\"rampUpStartTime\":{\"hour\":1976417253,\"minute\":68854326},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":398257944,\"rampUpCapacityThresholdPct\":156663672,\"peakStartTime\":{\"hour\":1961052031,\"minute\":1123544345},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":175699877,\"minute\":481409327},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":1920273783,\"rampDownCapacityThresholdPct\":905507147,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":1728715445,\"rampDownNotificationMessage\":\"cispnqzahmgkbr\",\"offPeakStartTime\":{\"hour\":188498280,\"minute\":1687540865},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},{\"name\":\"nuqqkpikadrgvt\",\"daysOfWeek\":[\"Tuesday\",\"Saturday\"],\"rampUpStartTime\":{\"hour\":122504841,\"minute\":855671205},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":508085674,\"rampUpCapacityThresholdPct\":834922568,\"peakStartTime\":{\"hour\":698240356,\"minute\":23060626},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":600405260,\"minute\":1045715770},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":2136509867,\"rampDownCapacityThresholdPct\":1477198207,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":282629437,\"rampDownNotificationMessage\":\"runmp\",\"offPeakStartTime\":{\"hour\":18555434,\"minute\":808779778},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"}],\"hostPoolReferences\":[{\"hostPoolArmPath\":\"l\",\"scalingPlanEnabled\":false},{\"hostPoolArmPath\":\"myskpbhenbtkcxy\",\"scalingPlanEnabled\":false},{\"hostPoolArmPath\":\"nrs\",\"scalingPlanEnabled\":false},{\"hostPoolArmPath\":\"idybyxczf\",\"scalingPlanEnabled\":true}]}}") .toObject(ScalingPlanPatch.class); - Assertions.assertEquals("bavo", model.tags().get("xzdmohctb")); - Assertions.assertEquals("qweykhmenev", model.description()); - Assertions.assertEquals("exfwhy", model.friendlyName()); - Assertions.assertEquals("i", model.timeZone()); - Assertions.assertEquals("yvdcsitynnaa", model.exclusionTag()); - Assertions.assertEquals("tehfiqscjeypvh", model.schedules().get(0).name()); + Assertions.assertEquals("nmmqhgyxzkon", model.tags().get("cukoklyaxuconu")); + Assertions.assertEquals("wv", model.description()); + Assertions.assertEquals("ektcxsen", model.friendlyName()); + Assertions.assertEquals("lrsf", model.timeZone()); + Assertions.assertEquals("zpwv", model.exclusionTag()); + Assertions.assertEquals("gbiqylihkaet", model.schedules().get(0).name()); + Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.THURSDAY, model.schedules().get(0).daysOfWeek().get(0)); + Assertions.assertEquals(493965696, model.schedules().get(0).rampUpStartTime().hour()); + Assertions.assertEquals(533172139, model.schedules().get(0).rampUpStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(693587344, model.schedules().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(1290040732, model.schedules().get(0).rampUpCapacityThresholdPct()); + Assertions.assertEquals(1486569340, model.schedules().get(0).rampUpMinimumHostsPct()); + Assertions.assertEquals(5394429, model.schedules().get(0).rampUpCapacityThresholdPct()); + Assertions.assertEquals(1059821653, model.schedules().get(0).peakStartTime().hour()); + Assertions.assertEquals(2064900799, model.schedules().get(0).peakStartTime().minute()); Assertions .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); + SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); + Assertions.assertEquals(1887113058, model.schedules().get(0).rampDownStartTime().hour()); + Assertions.assertEquals(1657324555, model.schedules().get(0).rampDownStartTime().minute()); Assertions .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, + SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(509090660, model.schedules().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(545322213, model.schedules().get(0).rampDownCapacityThresholdPct()); + Assertions.assertEquals(1278137451, model.schedules().get(0).rampDownMinimumHostsPct()); + Assertions.assertEquals(156873727, model.schedules().get(0).rampDownCapacityThresholdPct()); Assertions.assertEquals(true, model.schedules().get(0).rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(1069395538, model.schedules().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("qjpkcattpngjcrc", model.schedules().get(0).rampDownNotificationMessage()); + Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); + Assertions.assertEquals(112236140, model.schedules().get(0).rampDownWaitTimeMinutes()); + Assertions.assertEquals("txfvjrbirph", model.schedules().get(0).rampDownNotificationMessage()); + Assertions.assertEquals(1482882841, model.schedules().get(0).offPeakStartTime().hour()); + Assertions.assertEquals(99482426, model.schedules().get(0).offPeakStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("kthfui", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(true, model.hostPoolReferences().get(0).scalingPlanEnabled()); + Assertions.assertEquals("l", model.hostPoolReferences().get(0).hostPoolArmPath()); + Assertions.assertEquals(false, model.hostPoolReferences().get(0).scalingPlanEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScalingPlanPatch model = new ScalingPlanPatch() - .withTags(mapOf("xzdmohctb", "bavo", "ndnvo", "vudwx", "lazjdyggdtjixhbk", "gujjugwdkcglh")) - .withDescription("qweykhmenev") - .withFriendlyName("exfwhy") - .withTimeZone("i") - .withExclusionTag("yvdcsitynnaa") + .withTags(mapOf("cukoklyaxuconu", "nmmqhgyxzkon", "pewr", "szfkbe")) + .withDescription("wv") + .withFriendlyName("ektcxsen") + .withTimeZone("lrsf") + .withExclusionTag("zpwv") .withSchedules( Arrays .asList( new ScalingSchedule() - .withName("tehfiqscjeypvh") - .withDaysOfWeek(Arrays.asList()) + .withName("gbiqylihkaet") + .withDaysOfWeek( + Arrays + .asList( + ScalingScheduleDaysOfWeekItem.THURSDAY, + ScalingScheduleDaysOfWeekItem.THURSDAY, + ScalingScheduleDaysOfWeekItem.SUNDAY)) + .withRampUpStartTime(new Time().withHour(493965696).withMinute(533172139)) .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(693587344) - .withRampUpCapacityThresholdPct(1290040732) + .withRampUpMinimumHostsPct(1486569340) + .withRampUpCapacityThresholdPct(5394429) + .withPeakStartTime(new Time().withHour(1059821653).withMinute(2064900799)) + .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampDownStartTime(new Time().withHour(1887113058).withMinute(1657324555)) + .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownMinimumHostsPct(1278137451) + .withRampDownCapacityThresholdPct(156873727) + .withRampDownForceLogoffUsers(true) + .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) + .withRampDownWaitTimeMinutes(112236140) + .withRampDownNotificationMessage("txfvjrbirph") + .withOffPeakStartTime(new Time().withHour(1482882841).withMinute(99482426)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), + new ScalingSchedule() + .withName("hfnljkyq") + .withDaysOfWeek( + Arrays + .asList( + ScalingScheduleDaysOfWeekItem.SATURDAY, + ScalingScheduleDaysOfWeekItem.THURSDAY)) + .withRampUpStartTime(new Time().withHour(1054022835).withMinute(1970519416)) + .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampUpMinimumHostsPct(552165564) + .withRampUpCapacityThresholdPct(2084359484) + .withPeakStartTime(new Time().withHour(10143119).withMinute(1108075171)) + .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampDownStartTime(new Time().withHour(649555961).withMinute(1685542215)) + .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownMinimumHostsPct(1059812914) + .withRampDownCapacityThresholdPct(1745548413) + .withRampDownForceLogoffUsers(true) + .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) + .withRampDownWaitTimeMinutes(630804167) + .withRampDownNotificationMessage("zz") + .withOffPeakStartTime(new Time().withHour(1537141479).withMinute(1755265349)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), + new ScalingSchedule() + .withName("fvgxbfsmxneh") + .withDaysOfWeek( + Arrays + .asList( + ScalingScheduleDaysOfWeekItem.WEDNESDAY, + ScalingScheduleDaysOfWeekItem.WEDNESDAY, + ScalingScheduleDaysOfWeekItem.SUNDAY, + ScalingScheduleDaysOfWeekItem.SUNDAY)) + .withRampUpStartTime(new Time().withHour(1976417253).withMinute(68854326)) + .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampUpMinimumHostsPct(398257944) + .withRampUpCapacityThresholdPct(156663672) + .withPeakStartTime(new Time().withHour(1961052031).withMinute(1123544345)) .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownStartTime(new Time().withHour(175699877).withMinute(481409327)) .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownMinimumHostsPct(509090660) - .withRampDownCapacityThresholdPct(545322213) + .withRampDownMinimumHostsPct(1920273783) + .withRampDownCapacityThresholdPct(905507147) .withRampDownForceLogoffUsers(true) .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(1069395538) - .withRampDownNotificationMessage("qjpkcattpngjcrc") - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), + .withRampDownWaitTimeMinutes(1728715445) + .withRampDownNotificationMessage("cispnqzahmgkbr") + .withOffPeakStartTime(new Time().withHour(188498280).withMinute(1687540865)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST), new ScalingSchedule() - .withName("jh") - .withDaysOfWeek(Arrays.asList()) + .withName("nuqqkpikadrgvt") + .withDaysOfWeek( + Arrays + .asList( + ScalingScheduleDaysOfWeekItem.TUESDAY, + ScalingScheduleDaysOfWeekItem.SATURDAY)) + .withRampUpStartTime(new Time().withHour(122504841).withMinute(855671205)) .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(1964386727) - .withRampUpCapacityThresholdPct(1223642392) + .withRampUpMinimumHostsPct(508085674) + .withRampUpCapacityThresholdPct(834922568) + .withPeakStartTime(new Time().withHour(698240356).withMinute(23060626)) .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownStartTime(new Time().withHour(600405260).withMinute(1045715770)) .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(904416760) - .withRampDownCapacityThresholdPct(389510865) - .withRampDownForceLogoffUsers(false) + .withRampDownMinimumHostsPct(2136509867) + .withRampDownCapacityThresholdPct(1477198207) + .withRampDownForceLogoffUsers(true) .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(1111397810) - .withRampDownNotificationMessage("ltrpmopj") + .withRampDownWaitTimeMinutes(282629437) + .withRampDownNotificationMessage("runmp") + .withOffPeakStartTime(new Time().withHour(18555434).withMinute(808779778)) .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST))) .withHostPoolReferences( Arrays .asList( - new ScalingHostPoolReference().withHostPoolArmPath("kthfui").withScalingPlanEnabled(true))); + new ScalingHostPoolReference().withHostPoolArmPath("l").withScalingPlanEnabled(false), + new ScalingHostPoolReference() + .withHostPoolArmPath("myskpbhenbtkcxy") + .withScalingPlanEnabled(false), + new ScalingHostPoolReference().withHostPoolArmPath("nrs").withScalingPlanEnabled(false), + new ScalingHostPoolReference() + .withHostPoolArmPath("idybyxczf") + .withScalingPlanEnabled(true))); model = BinaryData.fromObject(model).toObject(ScalingPlanPatch.class); - Assertions.assertEquals("bavo", model.tags().get("xzdmohctb")); - Assertions.assertEquals("qweykhmenev", model.description()); - Assertions.assertEquals("exfwhy", model.friendlyName()); - Assertions.assertEquals("i", model.timeZone()); - Assertions.assertEquals("yvdcsitynnaa", model.exclusionTag()); - Assertions.assertEquals("tehfiqscjeypvh", model.schedules().get(0).name()); + Assertions.assertEquals("nmmqhgyxzkon", model.tags().get("cukoklyaxuconu")); + Assertions.assertEquals("wv", model.description()); + Assertions.assertEquals("ektcxsen", model.friendlyName()); + Assertions.assertEquals("lrsf", model.timeZone()); + Assertions.assertEquals("zpwv", model.exclusionTag()); + Assertions.assertEquals("gbiqylihkaet", model.schedules().get(0).name()); + Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.THURSDAY, model.schedules().get(0).daysOfWeek().get(0)); + Assertions.assertEquals(493965696, model.schedules().get(0).rampUpStartTime().hour()); + Assertions.assertEquals(533172139, model.schedules().get(0).rampUpStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(693587344, model.schedules().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(1290040732, model.schedules().get(0).rampUpCapacityThresholdPct()); + Assertions.assertEquals(1486569340, model.schedules().get(0).rampUpMinimumHostsPct()); + Assertions.assertEquals(5394429, model.schedules().get(0).rampUpCapacityThresholdPct()); + Assertions.assertEquals(1059821653, model.schedules().get(0).peakStartTime().hour()); + Assertions.assertEquals(2064900799, model.schedules().get(0).peakStartTime().minute()); Assertions .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); + SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); + Assertions.assertEquals(1887113058, model.schedules().get(0).rampDownStartTime().hour()); + Assertions.assertEquals(1657324555, model.schedules().get(0).rampDownStartTime().minute()); Assertions .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, + SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(509090660, model.schedules().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(545322213, model.schedules().get(0).rampDownCapacityThresholdPct()); + Assertions.assertEquals(1278137451, model.schedules().get(0).rampDownMinimumHostsPct()); + Assertions.assertEquals(156873727, model.schedules().get(0).rampDownCapacityThresholdPct()); Assertions.assertEquals(true, model.schedules().get(0).rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(1069395538, model.schedules().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("qjpkcattpngjcrc", model.schedules().get(0).rampDownNotificationMessage()); + Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); + Assertions.assertEquals(112236140, model.schedules().get(0).rampDownWaitTimeMinutes()); + Assertions.assertEquals("txfvjrbirph", model.schedules().get(0).rampDownNotificationMessage()); + Assertions.assertEquals(1482882841, model.schedules().get(0).offPeakStartTime().hour()); + Assertions.assertEquals(99482426, model.schedules().get(0).offPeakStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("kthfui", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(true, model.hostPoolReferences().get(0).scalingPlanEnabled()); + Assertions.assertEquals("l", model.hostPoolReferences().get(0).hostPoolArmPath()); + Assertions.assertEquals(false, model.hostPoolReferences().get(0).scalingPlanEnabled()); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalScheduleInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalScheduleInnerTests.java new file mode 100644 index 000000000000..3c3849a056fe --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalScheduleInnerTests.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; +import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScalingPlanPersonalScheduleInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScalingPlanPersonalScheduleInner model = + BinaryData + .fromString( + "{\"properties\":{\"daysOfWeek\":[\"Monday\",\"Friday\",\"Wednesday\"],\"rampUpStartTime\":{\"hour\":1500766151,\"minute\":1796159221},\"rampUpAutoStartHosts\":\"All\",\"rampUpStartVMOnConnect\":\"Enable\",\"rampUpActionOnDisconnect\":\"None\",\"rampUpMinutesToWaitOnDisconnect\":1230471233,\"rampUpActionOnLogoff\":\"Deallocate\",\"rampUpMinutesToWaitOnLogoff\":2000011197,\"peakStartTime\":{\"hour\":1573909011,\"minute\":2050375248},\"peakStartVMOnConnect\":\"Disable\",\"peakActionOnDisconnect\":\"None\",\"peakMinutesToWaitOnDisconnect\":613009021,\"peakActionOnLogoff\":\"Hibernate\",\"peakMinutesToWaitOnLogoff\":119641642,\"rampDownStartTime\":{\"hour\":939730908,\"minute\":1520557842},\"rampDownStartVMOnConnect\":\"Enable\",\"rampDownActionOnDisconnect\":\"Deallocate\",\"rampDownMinutesToWaitOnDisconnect\":282783230,\"rampDownActionOnLogoff\":\"None\",\"rampDownMinutesToWaitOnLogoff\":538641166,\"offPeakStartTime\":{\"hour\":1437797215,\"minute\":953152084},\"offPeakStartVMOnConnect\":\"Enable\",\"offPeakActionOnDisconnect\":\"None\",\"offPeakMinutesToWaitOnDisconnect\":591532413,\"offPeakActionOnLogoff\":\"None\",\"offPeakMinutesToWaitOnLogoff\":994320059},\"id\":\"t\",\"name\":\"oellwp\",\"type\":\"fdygpfqbuaceopz\"}") + .toObject(ScalingPlanPersonalScheduleInner.class); + Assertions.assertEquals(DayOfWeek.MONDAY, model.daysOfWeek().get(0)); + Assertions.assertEquals(1500766151, model.rampUpStartTime().hour()); + Assertions.assertEquals(1796159221, model.rampUpStartTime().minute()); + Assertions.assertEquals(StartupBehavior.ALL, model.rampUpAutoStartHosts()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampUpStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampUpActionOnDisconnect()); + Assertions.assertEquals(1230471233, model.rampUpMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.rampUpActionOnLogoff()); + Assertions.assertEquals(2000011197, model.rampUpMinutesToWaitOnLogoff()); + Assertions.assertEquals(1573909011, model.peakStartTime().hour()); + Assertions.assertEquals(2050375248, model.peakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.peakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.peakActionOnDisconnect()); + Assertions.assertEquals(613009021, model.peakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnLogoff()); + Assertions.assertEquals(119641642, model.peakMinutesToWaitOnLogoff()); + Assertions.assertEquals(939730908, model.rampDownStartTime().hour()); + Assertions.assertEquals(1520557842, model.rampDownStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampDownStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.rampDownActionOnDisconnect()); + Assertions.assertEquals(282783230, model.rampDownMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampDownActionOnLogoff()); + Assertions.assertEquals(538641166, model.rampDownMinutesToWaitOnLogoff()); + Assertions.assertEquals(1437797215, model.offPeakStartTime().hour()); + Assertions.assertEquals(953152084, model.offPeakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.offPeakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.offPeakActionOnDisconnect()); + Assertions.assertEquals(591532413, model.offPeakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.offPeakActionOnLogoff()); + Assertions.assertEquals(994320059, model.offPeakMinutesToWaitOnLogoff()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScalingPlanPersonalScheduleInner model = + new ScalingPlanPersonalScheduleInner() + .withDaysOfWeek(Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.FRIDAY, DayOfWeek.WEDNESDAY)) + .withRampUpStartTime(new Time().withHour(1500766151).withMinute(1796159221)) + .withRampUpAutoStartHosts(StartupBehavior.ALL) + .withRampUpStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withRampUpActionOnDisconnect(SessionHandlingOperation.NONE) + .withRampUpMinutesToWaitOnDisconnect(1230471233) + .withRampUpActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withRampUpMinutesToWaitOnLogoff(2000011197) + .withPeakStartTime(new Time().withHour(1573909011).withMinute(2050375248)) + .withPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) + .withPeakActionOnDisconnect(SessionHandlingOperation.NONE) + .withPeakMinutesToWaitOnDisconnect(613009021) + .withPeakActionOnLogoff(SessionHandlingOperation.HIBERNATE) + .withPeakMinutesToWaitOnLogoff(119641642) + .withRampDownStartTime(new Time().withHour(939730908).withMinute(1520557842)) + .withRampDownStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withRampDownActionOnDisconnect(SessionHandlingOperation.DEALLOCATE) + .withRampDownMinutesToWaitOnDisconnect(282783230) + .withRampDownActionOnLogoff(SessionHandlingOperation.NONE) + .withRampDownMinutesToWaitOnLogoff(538641166) + .withOffPeakStartTime(new Time().withHour(1437797215).withMinute(953152084)) + .withOffPeakStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withOffPeakActionOnDisconnect(SessionHandlingOperation.NONE) + .withOffPeakMinutesToWaitOnDisconnect(591532413) + .withOffPeakActionOnLogoff(SessionHandlingOperation.NONE) + .withOffPeakMinutesToWaitOnLogoff(994320059); + model = BinaryData.fromObject(model).toObject(ScalingPlanPersonalScheduleInner.class); + Assertions.assertEquals(DayOfWeek.MONDAY, model.daysOfWeek().get(0)); + Assertions.assertEquals(1500766151, model.rampUpStartTime().hour()); + Assertions.assertEquals(1796159221, model.rampUpStartTime().minute()); + Assertions.assertEquals(StartupBehavior.ALL, model.rampUpAutoStartHosts()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampUpStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampUpActionOnDisconnect()); + Assertions.assertEquals(1230471233, model.rampUpMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.rampUpActionOnLogoff()); + Assertions.assertEquals(2000011197, model.rampUpMinutesToWaitOnLogoff()); + Assertions.assertEquals(1573909011, model.peakStartTime().hour()); + Assertions.assertEquals(2050375248, model.peakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.peakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.peakActionOnDisconnect()); + Assertions.assertEquals(613009021, model.peakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnLogoff()); + Assertions.assertEquals(119641642, model.peakMinutesToWaitOnLogoff()); + Assertions.assertEquals(939730908, model.rampDownStartTime().hour()); + Assertions.assertEquals(1520557842, model.rampDownStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampDownStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.rampDownActionOnDisconnect()); + Assertions.assertEquals(282783230, model.rampDownMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampDownActionOnLogoff()); + Assertions.assertEquals(538641166, model.rampDownMinutesToWaitOnLogoff()); + Assertions.assertEquals(1437797215, model.offPeakStartTime().hour()); + Assertions.assertEquals(953152084, model.offPeakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.offPeakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.offPeakActionOnDisconnect()); + Assertions.assertEquals(591532413, model.offPeakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.offPeakActionOnLogoff()); + Assertions.assertEquals(994320059, model.offPeakMinutesToWaitOnLogoff()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalScheduleListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalScheduleListTests.java new file mode 100644 index 000000000000..9da203c65086 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalScheduleListTests.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalScheduleList; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; +import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScalingPlanPersonalScheduleListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScalingPlanPersonalScheduleList model = + BinaryData + .fromString( + "{\"value\":[{\"properties\":{\"daysOfWeek\":[\"Tuesday\",\"Tuesday\",\"Thursday\"],\"rampUpStartTime\":{\"hour\":1296787469,\"minute\":693295515},\"rampUpAutoStartHosts\":\"All\",\"rampUpStartVMOnConnect\":\"Enable\",\"rampUpActionOnDisconnect\":\"None\",\"rampUpMinutesToWaitOnDisconnect\":1336387683,\"rampUpActionOnLogoff\":\"Deallocate\",\"rampUpMinutesToWaitOnLogoff\":520113589,\"peakStartTime\":{\"hour\":1577221415,\"minute\":1359376561},\"peakStartVMOnConnect\":\"Enable\",\"peakActionOnDisconnect\":\"Hibernate\",\"peakMinutesToWaitOnDisconnect\":932797807,\"peakActionOnLogoff\":\"None\",\"peakMinutesToWaitOnLogoff\":567516658,\"rampDownStartTime\":{\"hour\":475216783,\"minute\":392993819},\"rampDownStartVMOnConnect\":\"Enable\",\"rampDownActionOnDisconnect\":\"None\",\"rampDownMinutesToWaitOnDisconnect\":249445305,\"rampDownActionOnLogoff\":\"None\",\"rampDownMinutesToWaitOnLogoff\":1060545026,\"offPeakStartTime\":{\"hour\":181665784,\"minute\":94266347},\"offPeakStartVMOnConnect\":\"Disable\",\"offPeakActionOnDisconnect\":\"Deallocate\",\"offPeakMinutesToWaitOnDisconnect\":655886827,\"offPeakActionOnLogoff\":\"Hibernate\",\"offPeakMinutesToWaitOnLogoff\":794984845},\"id\":\"jbi\",\"name\":\"xb\",\"type\":\"ybsrfbjfdtwss\"},{\"properties\":{\"daysOfWeek\":[\"Friday\",\"Tuesday\",\"Monday\",\"Sunday\"],\"rampUpStartTime\":{\"hour\":1933405011,\"minute\":1814798864},\"rampUpAutoStartHosts\":\"WithAssignedUser\",\"rampUpStartVMOnConnect\":\"Disable\",\"rampUpActionOnDisconnect\":\"None\",\"rampUpMinutesToWaitOnDisconnect\":267122524,\"rampUpActionOnLogoff\":\"Deallocate\",\"rampUpMinutesToWaitOnLogoff\":1827654965,\"peakStartTime\":{\"hour\":1651928304,\"minute\":600094153},\"peakStartVMOnConnect\":\"Enable\",\"peakActionOnDisconnect\":\"None\",\"peakMinutesToWaitOnDisconnect\":623539244,\"peakActionOnLogoff\":\"Deallocate\",\"peakMinutesToWaitOnLogoff\":994022828,\"rampDownStartTime\":{\"hour\":2112344615,\"minute\":1589023977},\"rampDownStartVMOnConnect\":\"Disable\",\"rampDownActionOnDisconnect\":\"None\",\"rampDownMinutesToWaitOnDisconnect\":778428037,\"rampDownActionOnLogoff\":\"None\",\"rampDownMinutesToWaitOnLogoff\":524895743,\"offPeakStartTime\":{\"hour\":1598094804,\"minute\":2026519653},\"offPeakStartVMOnConnect\":\"Disable\",\"offPeakActionOnDisconnect\":\"None\",\"offPeakMinutesToWaitOnDisconnect\":1059734695,\"offPeakActionOnLogoff\":\"None\",\"offPeakMinutesToWaitOnLogoff\":432099850},\"id\":\"pehindoygm\",\"name\":\"fthnzdn\",\"type\":\"sl\"}],\"nextLink\":\"ayqigynduhav\"}") + .toObject(ScalingPlanPersonalScheduleList.class); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.value().get(0).daysOfWeek().get(0)); + Assertions.assertEquals(1296787469, model.value().get(0).rampUpStartTime().hour()); + Assertions.assertEquals(693295515, model.value().get(0).rampUpStartTime().minute()); + Assertions.assertEquals(StartupBehavior.ALL, model.value().get(0).rampUpAutoStartHosts()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.value().get(0).rampUpStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).rampUpActionOnDisconnect()); + Assertions.assertEquals(1336387683, model.value().get(0).rampUpMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.value().get(0).rampUpActionOnLogoff()); + Assertions.assertEquals(520113589, model.value().get(0).rampUpMinutesToWaitOnLogoff()); + Assertions.assertEquals(1577221415, model.value().get(0).peakStartTime().hour()); + Assertions.assertEquals(1359376561, model.value().get(0).peakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.value().get(0).peakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.value().get(0).peakActionOnDisconnect()); + Assertions.assertEquals(932797807, model.value().get(0).peakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).peakActionOnLogoff()); + Assertions.assertEquals(567516658, model.value().get(0).peakMinutesToWaitOnLogoff()); + Assertions.assertEquals(475216783, model.value().get(0).rampDownStartTime().hour()); + Assertions.assertEquals(392993819, model.value().get(0).rampDownStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.value().get(0).rampDownStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).rampDownActionOnDisconnect()); + Assertions.assertEquals(249445305, model.value().get(0).rampDownMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).rampDownActionOnLogoff()); + Assertions.assertEquals(1060545026, model.value().get(0).rampDownMinutesToWaitOnLogoff()); + Assertions.assertEquals(181665784, model.value().get(0).offPeakStartTime().hour()); + Assertions.assertEquals(94266347, model.value().get(0).offPeakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.value().get(0).offPeakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.value().get(0).offPeakActionOnDisconnect()); + Assertions.assertEquals(655886827, model.value().get(0).offPeakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.value().get(0).offPeakActionOnLogoff()); + Assertions.assertEquals(794984845, model.value().get(0).offPeakMinutesToWaitOnLogoff()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScalingPlanPersonalScheduleList model = + new ScalingPlanPersonalScheduleList() + .withValue( + Arrays + .asList( + new ScalingPlanPersonalScheduleInner() + .withDaysOfWeek(Arrays.asList(DayOfWeek.TUESDAY, DayOfWeek.TUESDAY, DayOfWeek.THURSDAY)) + .withRampUpStartTime(new Time().withHour(1296787469).withMinute(693295515)) + .withRampUpAutoStartHosts(StartupBehavior.ALL) + .withRampUpStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withRampUpActionOnDisconnect(SessionHandlingOperation.NONE) + .withRampUpMinutesToWaitOnDisconnect(1336387683) + .withRampUpActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withRampUpMinutesToWaitOnLogoff(520113589) + .withPeakStartTime(new Time().withHour(1577221415).withMinute(1359376561)) + .withPeakStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withPeakActionOnDisconnect(SessionHandlingOperation.HIBERNATE) + .withPeakMinutesToWaitOnDisconnect(932797807) + .withPeakActionOnLogoff(SessionHandlingOperation.NONE) + .withPeakMinutesToWaitOnLogoff(567516658) + .withRampDownStartTime(new Time().withHour(475216783).withMinute(392993819)) + .withRampDownStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withRampDownActionOnDisconnect(SessionHandlingOperation.NONE) + .withRampDownMinutesToWaitOnDisconnect(249445305) + .withRampDownActionOnLogoff(SessionHandlingOperation.NONE) + .withRampDownMinutesToWaitOnLogoff(1060545026) + .withOffPeakStartTime(new Time().withHour(181665784).withMinute(94266347)) + .withOffPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) + .withOffPeakActionOnDisconnect(SessionHandlingOperation.DEALLOCATE) + .withOffPeakMinutesToWaitOnDisconnect(655886827) + .withOffPeakActionOnLogoff(SessionHandlingOperation.HIBERNATE) + .withOffPeakMinutesToWaitOnLogoff(794984845), + new ScalingPlanPersonalScheduleInner() + .withDaysOfWeek( + Arrays + .asList( + DayOfWeek.FRIDAY, DayOfWeek.TUESDAY, DayOfWeek.MONDAY, DayOfWeek.SUNDAY)) + .withRampUpStartTime(new Time().withHour(1933405011).withMinute(1814798864)) + .withRampUpAutoStartHosts(StartupBehavior.WITH_ASSIGNED_USER) + .withRampUpStartVMOnConnect(SetStartVMOnConnect.DISABLE) + .withRampUpActionOnDisconnect(SessionHandlingOperation.NONE) + .withRampUpMinutesToWaitOnDisconnect(267122524) + .withRampUpActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withRampUpMinutesToWaitOnLogoff(1827654965) + .withPeakStartTime(new Time().withHour(1651928304).withMinute(600094153)) + .withPeakStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withPeakActionOnDisconnect(SessionHandlingOperation.NONE) + .withPeakMinutesToWaitOnDisconnect(623539244) + .withPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withPeakMinutesToWaitOnLogoff(994022828) + .withRampDownStartTime(new Time().withHour(2112344615).withMinute(1589023977)) + .withRampDownStartVMOnConnect(SetStartVMOnConnect.DISABLE) + .withRampDownActionOnDisconnect(SessionHandlingOperation.NONE) + .withRampDownMinutesToWaitOnDisconnect(778428037) + .withRampDownActionOnLogoff(SessionHandlingOperation.NONE) + .withRampDownMinutesToWaitOnLogoff(524895743) + .withOffPeakStartTime(new Time().withHour(1598094804).withMinute(2026519653)) + .withOffPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) + .withOffPeakActionOnDisconnect(SessionHandlingOperation.NONE) + .withOffPeakMinutesToWaitOnDisconnect(1059734695) + .withOffPeakActionOnLogoff(SessionHandlingOperation.NONE) + .withOffPeakMinutesToWaitOnLogoff(432099850))); + model = BinaryData.fromObject(model).toObject(ScalingPlanPersonalScheduleList.class); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.value().get(0).daysOfWeek().get(0)); + Assertions.assertEquals(1296787469, model.value().get(0).rampUpStartTime().hour()); + Assertions.assertEquals(693295515, model.value().get(0).rampUpStartTime().minute()); + Assertions.assertEquals(StartupBehavior.ALL, model.value().get(0).rampUpAutoStartHosts()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.value().get(0).rampUpStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).rampUpActionOnDisconnect()); + Assertions.assertEquals(1336387683, model.value().get(0).rampUpMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.value().get(0).rampUpActionOnLogoff()); + Assertions.assertEquals(520113589, model.value().get(0).rampUpMinutesToWaitOnLogoff()); + Assertions.assertEquals(1577221415, model.value().get(0).peakStartTime().hour()); + Assertions.assertEquals(1359376561, model.value().get(0).peakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.value().get(0).peakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.value().get(0).peakActionOnDisconnect()); + Assertions.assertEquals(932797807, model.value().get(0).peakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).peakActionOnLogoff()); + Assertions.assertEquals(567516658, model.value().get(0).peakMinutesToWaitOnLogoff()); + Assertions.assertEquals(475216783, model.value().get(0).rampDownStartTime().hour()); + Assertions.assertEquals(392993819, model.value().get(0).rampDownStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.value().get(0).rampDownStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).rampDownActionOnDisconnect()); + Assertions.assertEquals(249445305, model.value().get(0).rampDownMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).rampDownActionOnLogoff()); + Assertions.assertEquals(1060545026, model.value().get(0).rampDownMinutesToWaitOnLogoff()); + Assertions.assertEquals(181665784, model.value().get(0).offPeakStartTime().hour()); + Assertions.assertEquals(94266347, model.value().get(0).offPeakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.value().get(0).offPeakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.value().get(0).offPeakActionOnDisconnect()); + Assertions.assertEquals(655886827, model.value().get(0).offPeakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.value().get(0).offPeakActionOnLogoff()); + Assertions.assertEquals(794984845, model.value().get(0).offPeakMinutesToWaitOnLogoff()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulePatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulePatchTests.java new file mode 100644 index 000000000000..8660dc9d93da --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulePatchTests.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedulePatch; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; +import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScalingPlanPersonalSchedulePatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScalingPlanPersonalSchedulePatch model = + BinaryData + .fromString( + "{\"properties\":{\"daysOfWeek\":[\"Wednesday\",\"Tuesday\"],\"rampUpStartTime\":{\"hour\":256415791,\"minute\":1905459835},\"rampUpAutoStartHosts\":\"All\",\"rampUpStartVMOnConnect\":\"Enable\",\"rampUpActionOnDisconnect\":\"Hibernate\",\"rampUpMinutesToWaitOnDisconnect\":258725864,\"rampUpActionOnLogoff\":\"Hibernate\",\"rampUpMinutesToWaitOnLogoff\":1042702068,\"peakStartTime\":{\"hour\":1688847935,\"minute\":1314959549},\"peakStartVMOnConnect\":\"Disable\",\"peakActionOnDisconnect\":\"Hibernate\",\"peakMinutesToWaitOnDisconnect\":928593835,\"peakActionOnLogoff\":\"Hibernate\",\"peakMinutesToWaitOnLogoff\":2022160914,\"rampDownStartTime\":{\"hour\":1631327314,\"minute\":1757404890},\"rampDownStartVMOnConnect\":\"Enable\",\"rampDownActionOnDisconnect\":\"None\",\"rampDownMinutesToWaitOnDisconnect\":43385515,\"rampDownActionOnLogoff\":\"Hibernate\",\"rampDownMinutesToWaitOnLogoff\":928990245,\"offPeakStartTime\":{\"hour\":1261594790,\"minute\":1493412527},\"offPeakStartVMOnConnect\":\"Disable\",\"offPeakActionOnDisconnect\":\"Deallocate\",\"offPeakMinutesToWaitOnDisconnect\":1076611714,\"offPeakActionOnLogoff\":\"Deallocate\",\"offPeakMinutesToWaitOnLogoff\":76309450}}") + .toObject(ScalingPlanPersonalSchedulePatch.class); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.daysOfWeek().get(0)); + Assertions.assertEquals(256415791, model.rampUpStartTime().hour()); + Assertions.assertEquals(1905459835, model.rampUpStartTime().minute()); + Assertions.assertEquals(StartupBehavior.ALL, model.rampUpAutoStartHosts()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampUpStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampUpActionOnDisconnect()); + Assertions.assertEquals(258725864, model.rampUpMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampUpActionOnLogoff()); + Assertions.assertEquals(1042702068, model.rampUpMinutesToWaitOnLogoff()); + Assertions.assertEquals(1688847935, model.peakStartTime().hour()); + Assertions.assertEquals(1314959549, model.peakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.peakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnDisconnect()); + Assertions.assertEquals(928593835, model.peakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnLogoff()); + Assertions.assertEquals(2022160914, model.peakMinutesToWaitOnLogoff()); + Assertions.assertEquals(1631327314, model.rampDownStartTime().hour()); + Assertions.assertEquals(1757404890, model.rampDownStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampDownStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampDownActionOnDisconnect()); + Assertions.assertEquals(43385515, model.rampDownMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampDownActionOnLogoff()); + Assertions.assertEquals(928990245, model.rampDownMinutesToWaitOnLogoff()); + Assertions.assertEquals(1261594790, model.offPeakStartTime().hour()); + Assertions.assertEquals(1493412527, model.offPeakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.offPeakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.offPeakActionOnDisconnect()); + Assertions.assertEquals(1076611714, model.offPeakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.offPeakActionOnLogoff()); + Assertions.assertEquals(76309450, model.offPeakMinutesToWaitOnLogoff()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScalingPlanPersonalSchedulePatch model = + new ScalingPlanPersonalSchedulePatch() + .withDaysOfWeek(Arrays.asList(DayOfWeek.WEDNESDAY, DayOfWeek.TUESDAY)) + .withRampUpStartTime(new Time().withHour(256415791).withMinute(1905459835)) + .withRampUpAutoStartHosts(StartupBehavior.ALL) + .withRampUpStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withRampUpActionOnDisconnect(SessionHandlingOperation.HIBERNATE) + .withRampUpMinutesToWaitOnDisconnect(258725864) + .withRampUpActionOnLogoff(SessionHandlingOperation.HIBERNATE) + .withRampUpMinutesToWaitOnLogoff(1042702068) + .withPeakStartTime(new Time().withHour(1688847935).withMinute(1314959549)) + .withPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) + .withPeakActionOnDisconnect(SessionHandlingOperation.HIBERNATE) + .withPeakMinutesToWaitOnDisconnect(928593835) + .withPeakActionOnLogoff(SessionHandlingOperation.HIBERNATE) + .withPeakMinutesToWaitOnLogoff(2022160914) + .withRampDownStartTime(new Time().withHour(1631327314).withMinute(1757404890)) + .withRampDownStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withRampDownActionOnDisconnect(SessionHandlingOperation.NONE) + .withRampDownMinutesToWaitOnDisconnect(43385515) + .withRampDownActionOnLogoff(SessionHandlingOperation.HIBERNATE) + .withRampDownMinutesToWaitOnLogoff(928990245) + .withOffPeakStartTime(new Time().withHour(1261594790).withMinute(1493412527)) + .withOffPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) + .withOffPeakActionOnDisconnect(SessionHandlingOperation.DEALLOCATE) + .withOffPeakMinutesToWaitOnDisconnect(1076611714) + .withOffPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withOffPeakMinutesToWaitOnLogoff(76309450); + model = BinaryData.fromObject(model).toObject(ScalingPlanPersonalSchedulePatch.class); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.daysOfWeek().get(0)); + Assertions.assertEquals(256415791, model.rampUpStartTime().hour()); + Assertions.assertEquals(1905459835, model.rampUpStartTime().minute()); + Assertions.assertEquals(StartupBehavior.ALL, model.rampUpAutoStartHosts()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampUpStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampUpActionOnDisconnect()); + Assertions.assertEquals(258725864, model.rampUpMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampUpActionOnLogoff()); + Assertions.assertEquals(1042702068, model.rampUpMinutesToWaitOnLogoff()); + Assertions.assertEquals(1688847935, model.peakStartTime().hour()); + Assertions.assertEquals(1314959549, model.peakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.peakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnDisconnect()); + Assertions.assertEquals(928593835, model.peakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnLogoff()); + Assertions.assertEquals(2022160914, model.peakMinutesToWaitOnLogoff()); + Assertions.assertEquals(1631327314, model.rampDownStartTime().hour()); + Assertions.assertEquals(1757404890, model.rampDownStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampDownStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampDownActionOnDisconnect()); + Assertions.assertEquals(43385515, model.rampDownMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampDownActionOnLogoff()); + Assertions.assertEquals(928990245, model.rampDownMinutesToWaitOnLogoff()); + Assertions.assertEquals(1261594790, model.offPeakStartTime().hour()); + Assertions.assertEquals(1493412527, model.offPeakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.offPeakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.offPeakActionOnDisconnect()); + Assertions.assertEquals(1076611714, model.offPeakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.offPeakActionOnLogoff()); + Assertions.assertEquals(76309450, model.offPeakMinutesToWaitOnLogoff()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulePropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulePropertiesTests.java new file mode 100644 index 000000000000..325afcc7611b --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulePropertiesTests.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleProperties; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; +import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScalingPlanPersonalSchedulePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScalingPlanPersonalScheduleProperties model = + BinaryData + .fromString( + "{\"daysOfWeek\":[\"Thursday\",\"Monday\",\"Wednesday\",\"Tuesday\"],\"rampUpStartTime\":{\"hour\":90973381,\"minute\":284689658},\"rampUpAutoStartHosts\":\"All\",\"rampUpStartVMOnConnect\":\"Enable\",\"rampUpActionOnDisconnect\":\"None\",\"rampUpMinutesToWaitOnDisconnect\":1990032205,\"rampUpActionOnLogoff\":\"None\",\"rampUpMinutesToWaitOnLogoff\":1114534772,\"peakStartTime\":{\"hour\":883110642,\"minute\":1247520399},\"peakStartVMOnConnect\":\"Disable\",\"peakActionOnDisconnect\":\"Hibernate\",\"peakMinutesToWaitOnDisconnect\":1114721091,\"peakActionOnLogoff\":\"None\",\"peakMinutesToWaitOnLogoff\":1356840761,\"rampDownStartTime\":{\"hour\":1358257343,\"minute\":2138169830},\"rampDownStartVMOnConnect\":\"Disable\",\"rampDownActionOnDisconnect\":\"Hibernate\",\"rampDownMinutesToWaitOnDisconnect\":919813735,\"rampDownActionOnLogoff\":\"Deallocate\",\"rampDownMinutesToWaitOnLogoff\":159831897,\"offPeakStartTime\":{\"hour\":527212463,\"minute\":1504791861},\"offPeakStartVMOnConnect\":\"Enable\",\"offPeakActionOnDisconnect\":\"Hibernate\",\"offPeakMinutesToWaitOnDisconnect\":529783276,\"offPeakActionOnLogoff\":\"None\",\"offPeakMinutesToWaitOnLogoff\":478088407}") + .toObject(ScalingPlanPersonalScheduleProperties.class); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.daysOfWeek().get(0)); + Assertions.assertEquals(90973381, model.rampUpStartTime().hour()); + Assertions.assertEquals(284689658, model.rampUpStartTime().minute()); + Assertions.assertEquals(StartupBehavior.ALL, model.rampUpAutoStartHosts()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampUpStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampUpActionOnDisconnect()); + Assertions.assertEquals(1990032205, model.rampUpMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampUpActionOnLogoff()); + Assertions.assertEquals(1114534772, model.rampUpMinutesToWaitOnLogoff()); + Assertions.assertEquals(883110642, model.peakStartTime().hour()); + Assertions.assertEquals(1247520399, model.peakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.peakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnDisconnect()); + Assertions.assertEquals(1114721091, model.peakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.peakActionOnLogoff()); + Assertions.assertEquals(1356840761, model.peakMinutesToWaitOnLogoff()); + Assertions.assertEquals(1358257343, model.rampDownStartTime().hour()); + Assertions.assertEquals(2138169830, model.rampDownStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.rampDownStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampDownActionOnDisconnect()); + Assertions.assertEquals(919813735, model.rampDownMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.rampDownActionOnLogoff()); + Assertions.assertEquals(159831897, model.rampDownMinutesToWaitOnLogoff()); + Assertions.assertEquals(527212463, model.offPeakStartTime().hour()); + Assertions.assertEquals(1504791861, model.offPeakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.offPeakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.offPeakActionOnDisconnect()); + Assertions.assertEquals(529783276, model.offPeakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.offPeakActionOnLogoff()); + Assertions.assertEquals(478088407, model.offPeakMinutesToWaitOnLogoff()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScalingPlanPersonalScheduleProperties model = + new ScalingPlanPersonalScheduleProperties() + .withDaysOfWeek( + Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.MONDAY, DayOfWeek.WEDNESDAY, DayOfWeek.TUESDAY)) + .withRampUpStartTime(new Time().withHour(90973381).withMinute(284689658)) + .withRampUpAutoStartHosts(StartupBehavior.ALL) + .withRampUpStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withRampUpActionOnDisconnect(SessionHandlingOperation.NONE) + .withRampUpMinutesToWaitOnDisconnect(1990032205) + .withRampUpActionOnLogoff(SessionHandlingOperation.NONE) + .withRampUpMinutesToWaitOnLogoff(1114534772) + .withPeakStartTime(new Time().withHour(883110642).withMinute(1247520399)) + .withPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) + .withPeakActionOnDisconnect(SessionHandlingOperation.HIBERNATE) + .withPeakMinutesToWaitOnDisconnect(1114721091) + .withPeakActionOnLogoff(SessionHandlingOperation.NONE) + .withPeakMinutesToWaitOnLogoff(1356840761) + .withRampDownStartTime(new Time().withHour(1358257343).withMinute(2138169830)) + .withRampDownStartVMOnConnect(SetStartVMOnConnect.DISABLE) + .withRampDownActionOnDisconnect(SessionHandlingOperation.HIBERNATE) + .withRampDownMinutesToWaitOnDisconnect(919813735) + .withRampDownActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withRampDownMinutesToWaitOnLogoff(159831897) + .withOffPeakStartTime(new Time().withHour(527212463).withMinute(1504791861)) + .withOffPeakStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withOffPeakActionOnDisconnect(SessionHandlingOperation.HIBERNATE) + .withOffPeakMinutesToWaitOnDisconnect(529783276) + .withOffPeakActionOnLogoff(SessionHandlingOperation.NONE) + .withOffPeakMinutesToWaitOnLogoff(478088407); + model = BinaryData.fromObject(model).toObject(ScalingPlanPersonalScheduleProperties.class); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.daysOfWeek().get(0)); + Assertions.assertEquals(90973381, model.rampUpStartTime().hour()); + Assertions.assertEquals(284689658, model.rampUpStartTime().minute()); + Assertions.assertEquals(StartupBehavior.ALL, model.rampUpAutoStartHosts()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampUpStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampUpActionOnDisconnect()); + Assertions.assertEquals(1990032205, model.rampUpMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampUpActionOnLogoff()); + Assertions.assertEquals(1114534772, model.rampUpMinutesToWaitOnLogoff()); + Assertions.assertEquals(883110642, model.peakStartTime().hour()); + Assertions.assertEquals(1247520399, model.peakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.peakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnDisconnect()); + Assertions.assertEquals(1114721091, model.peakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.peakActionOnLogoff()); + Assertions.assertEquals(1356840761, model.peakMinutesToWaitOnLogoff()); + Assertions.assertEquals(1358257343, model.rampDownStartTime().hour()); + Assertions.assertEquals(2138169830, model.rampDownStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.rampDownStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampDownActionOnDisconnect()); + Assertions.assertEquals(919813735, model.rampDownMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.rampDownActionOnLogoff()); + Assertions.assertEquals(159831897, model.rampDownMinutesToWaitOnLogoff()); + Assertions.assertEquals(527212463, model.offPeakStartTime().hour()); + Assertions.assertEquals(1504791861, model.offPeakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.offPeakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.offPeakActionOnDisconnect()); + Assertions.assertEquals(529783276, model.offPeakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, model.offPeakActionOnLogoff()); + Assertions.assertEquals(478088407, model.offPeakMinutesToWaitOnLogoff()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesCreateWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesCreateWithResponseMockTests.java new file mode 100644 index 000000000000..e2540474a270 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesCreateWithResponseMockTests.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedule; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; +import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class ScalingPlanPersonalSchedulesCreateWithResponseMockTests { + @Test + public void testCreateWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr = + "{\"properties\":{\"daysOfWeek\":[\"Thursday\",\"Saturday\"],\"rampUpStartTime\":{\"hour\":474729802,\"minute\":513283107},\"rampUpAutoStartHosts\":\"All\",\"rampUpStartVMOnConnect\":\"Enable\",\"rampUpActionOnDisconnect\":\"None\",\"rampUpMinutesToWaitOnDisconnect\":120570270,\"rampUpActionOnLogoff\":\"Deallocate\",\"rampUpMinutesToWaitOnLogoff\":1801029414,\"peakStartTime\":{\"hour\":2013893290,\"minute\":728731016},\"peakStartVMOnConnect\":\"Disable\",\"peakActionOnDisconnect\":\"None\",\"peakMinutesToWaitOnDisconnect\":956531866,\"peakActionOnLogoff\":\"Deallocate\",\"peakMinutesToWaitOnLogoff\":1159295504,\"rampDownStartTime\":{\"hour\":881600617,\"minute\":323271862},\"rampDownStartVMOnConnect\":\"Disable\",\"rampDownActionOnDisconnect\":\"Hibernate\",\"rampDownMinutesToWaitOnDisconnect\":643996998,\"rampDownActionOnLogoff\":\"None\",\"rampDownMinutesToWaitOnLogoff\":1995436037,\"offPeakStartTime\":{\"hour\":429676827,\"minute\":550582192},\"offPeakStartVMOnConnect\":\"Disable\",\"offPeakActionOnDisconnect\":\"Hibernate\",\"offPeakMinutesToWaitOnDisconnect\":420064622,\"offPeakActionOnLogoff\":\"Hibernate\",\"offPeakMinutesToWaitOnLogoff\":617111065},\"id\":\"iroqbosh\",\"name\":\"ragapyyrmfsvbp\",\"type\":\"vbopfppdbwnu\"}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito + .when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito + .when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito + .when(httpClient.send(httpRequest.capture(), Mockito.any())) + .thenReturn( + Mono + .defer( + () -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + DesktopVirtualizationManager manager = + DesktopVirtualizationManager + .configure() + .withHttpClient(httpClient) + .authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + ScalingPlanPersonalSchedule response = + manager + .scalingPlanPersonalSchedules() + .define("tlyo") + .withExistingScalingPlan("xbannovvoxc", "ytprwnwvroev") + .withDaysOfWeek( + Arrays.asList(DayOfWeek.FRIDAY, DayOfWeek.MONDAY, DayOfWeek.WEDNESDAY, DayOfWeek.MONDAY)) + .withRampUpStartTime(new Time().withHour(725083050).withMinute(1442660338)) + .withRampUpAutoStartHosts(StartupBehavior.NONE) + .withRampUpStartVMOnConnect(SetStartVMOnConnect.DISABLE) + .withRampUpActionOnDisconnect(SessionHandlingOperation.HIBERNATE) + .withRampUpMinutesToWaitOnDisconnect(251649293) + .withRampUpActionOnLogoff(SessionHandlingOperation.HIBERNATE) + .withRampUpMinutesToWaitOnLogoff(1458275962) + .withPeakStartTime(new Time().withHour(952405971).withMinute(1835764964)) + .withPeakStartVMOnConnect(SetStartVMOnConnect.ENABLE) + .withPeakActionOnDisconnect(SessionHandlingOperation.NONE) + .withPeakMinutesToWaitOnDisconnect(61809023) + .withPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withPeakMinutesToWaitOnLogoff(552291505) + .withRampDownStartTime(new Time().withHour(796000684).withMinute(312997434)) + .withRampDownStartVMOnConnect(SetStartVMOnConnect.DISABLE) + .withRampDownActionOnDisconnect(SessionHandlingOperation.NONE) + .withRampDownMinutesToWaitOnDisconnect(1195443779) + .withRampDownActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withRampDownMinutesToWaitOnLogoff(1597074926) + .withOffPeakStartTime(new Time().withHour(1352836682).withMinute(315314299)) + .withOffPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) + .withOffPeakActionOnDisconnect(SessionHandlingOperation.NONE) + .withOffPeakMinutesToWaitOnDisconnect(265709427) + .withOffPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) + .withOffPeakMinutesToWaitOnLogoff(347000614) + .create(); + + Assertions.assertEquals(DayOfWeek.THURSDAY, response.daysOfWeek().get(0)); + Assertions.assertEquals(474729802, response.rampUpStartTime().hour()); + Assertions.assertEquals(513283107, response.rampUpStartTime().minute()); + Assertions.assertEquals(StartupBehavior.ALL, response.rampUpAutoStartHosts()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, response.rampUpStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, response.rampUpActionOnDisconnect()); + Assertions.assertEquals(120570270, response.rampUpMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, response.rampUpActionOnLogoff()); + Assertions.assertEquals(1801029414, response.rampUpMinutesToWaitOnLogoff()); + Assertions.assertEquals(2013893290, response.peakStartTime().hour()); + Assertions.assertEquals(728731016, response.peakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, response.peakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, response.peakActionOnDisconnect()); + Assertions.assertEquals(956531866, response.peakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, response.peakActionOnLogoff()); + Assertions.assertEquals(1159295504, response.peakMinutesToWaitOnLogoff()); + Assertions.assertEquals(881600617, response.rampDownStartTime().hour()); + Assertions.assertEquals(323271862, response.rampDownStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, response.rampDownStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.rampDownActionOnDisconnect()); + Assertions.assertEquals(643996998, response.rampDownMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, response.rampDownActionOnLogoff()); + Assertions.assertEquals(1995436037, response.rampDownMinutesToWaitOnLogoff()); + Assertions.assertEquals(429676827, response.offPeakStartTime().hour()); + Assertions.assertEquals(550582192, response.offPeakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, response.offPeakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.offPeakActionOnDisconnect()); + Assertions.assertEquals(420064622, response.offPeakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.offPeakActionOnLogoff()); + Assertions.assertEquals(617111065, response.offPeakMinutesToWaitOnLogoff()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteWithResponseMockTests.java new file mode 100644 index 000000000000..b29aa469df05 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteWithResponseMockTests.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class ScalingPlanPersonalSchedulesDeleteWithResponseMockTests { + @Test + public void testDeleteWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr = "{}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito + .when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito + .when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito + .when(httpClient.send(httpRequest.capture(), Mockito.any())) + .thenReturn( + Mono + .defer( + () -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + DesktopVirtualizationManager manager = + DesktopVirtualizationManager + .configure() + .withHttpClient(httpClient) + .authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager + .scalingPlanPersonalSchedules() + .deleteWithResponse("qwtehtuevr", "rljyoogwxhnsdu", "gwbsreurf", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesGetWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesGetWithResponseMockTests.java new file mode 100644 index 000000000000..e9d386b188d2 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesGetWithResponseMockTests.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedule; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; +import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class ScalingPlanPersonalSchedulesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr = + "{\"properties\":{\"daysOfWeek\":[\"Wednesday\"],\"rampUpStartTime\":{\"hour\":504276200,\"minute\":273714552},\"rampUpAutoStartHosts\":\"All\",\"rampUpStartVMOnConnect\":\"Enable\",\"rampUpActionOnDisconnect\":\"Hibernate\",\"rampUpMinutesToWaitOnDisconnect\":837661803,\"rampUpActionOnLogoff\":\"Hibernate\",\"rampUpMinutesToWaitOnLogoff\":1248753250,\"peakStartTime\":{\"hour\":442073665,\"minute\":2020150927},\"peakStartVMOnConnect\":\"Disable\",\"peakActionOnDisconnect\":\"None\",\"peakMinutesToWaitOnDisconnect\":792139303,\"peakActionOnLogoff\":\"Deallocate\",\"peakMinutesToWaitOnLogoff\":381107449,\"rampDownStartTime\":{\"hour\":639293987,\"minute\":685959660},\"rampDownStartVMOnConnect\":\"Disable\",\"rampDownActionOnDisconnect\":\"Deallocate\",\"rampDownMinutesToWaitOnDisconnect\":1539061935,\"rampDownActionOnLogoff\":\"Hibernate\",\"rampDownMinutesToWaitOnLogoff\":1692137412,\"offPeakStartTime\":{\"hour\":45100221,\"minute\":758863003},\"offPeakStartVMOnConnect\":\"Disable\",\"offPeakActionOnDisconnect\":\"Hibernate\",\"offPeakMinutesToWaitOnDisconnect\":2055999585,\"offPeakActionOnLogoff\":\"Hibernate\",\"offPeakMinutesToWaitOnLogoff\":1093469503},\"id\":\"hfhpfp\",\"name\":\"zjzoywjxhpdul\",\"type\":\"ntacn\"}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito + .when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito + .when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito + .when(httpClient.send(httpRequest.capture(), Mockito.any())) + .thenReturn( + Mono + .defer( + () -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + DesktopVirtualizationManager manager = + DesktopVirtualizationManager + .configure() + .withHttpClient(httpClient) + .authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + ScalingPlanPersonalSchedule response = + manager + .scalingPlanPersonalSchedules() + .getWithResponse("byrplrohkpig", "fusuckzmkwklsno", "axmqeqal", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(DayOfWeek.WEDNESDAY, response.daysOfWeek().get(0)); + Assertions.assertEquals(504276200, response.rampUpStartTime().hour()); + Assertions.assertEquals(273714552, response.rampUpStartTime().minute()); + Assertions.assertEquals(StartupBehavior.ALL, response.rampUpAutoStartHosts()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, response.rampUpStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.rampUpActionOnDisconnect()); + Assertions.assertEquals(837661803, response.rampUpMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.rampUpActionOnLogoff()); + Assertions.assertEquals(1248753250, response.rampUpMinutesToWaitOnLogoff()); + Assertions.assertEquals(442073665, response.peakStartTime().hour()); + Assertions.assertEquals(2020150927, response.peakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, response.peakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, response.peakActionOnDisconnect()); + Assertions.assertEquals(792139303, response.peakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, response.peakActionOnLogoff()); + Assertions.assertEquals(381107449, response.peakMinutesToWaitOnLogoff()); + Assertions.assertEquals(639293987, response.rampDownStartTime().hour()); + Assertions.assertEquals(685959660, response.rampDownStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, response.rampDownStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, response.rampDownActionOnDisconnect()); + Assertions.assertEquals(1539061935, response.rampDownMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.rampDownActionOnLogoff()); + Assertions.assertEquals(1692137412, response.rampDownMinutesToWaitOnLogoff()); + Assertions.assertEquals(45100221, response.offPeakStartTime().hour()); + Assertions.assertEquals(758863003, response.offPeakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, response.offPeakStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.offPeakActionOnDisconnect()); + Assertions.assertEquals(2055999585, response.offPeakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.offPeakActionOnLogoff()); + Assertions.assertEquals(1093469503, response.offPeakMinutesToWaitOnLogoff()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesListMockTests.java new file mode 100644 index 000000000000..2d5671df4cc3 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesListMockTests.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedule; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; +import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class ScalingPlanPersonalSchedulesListMockTests { + @Test + public void testList() throws Exception { + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse httpResponse = Mockito.mock(HttpResponse.class); + ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + + String responseStr = + "{\"value\":[{\"properties\":{\"daysOfWeek\":[\"Saturday\",\"Saturday\"],\"rampUpStartTime\":{\"hour\":1124530948,\"minute\":499319607},\"rampUpAutoStartHosts\":\"None\",\"rampUpStartVMOnConnect\":\"Enable\",\"rampUpActionOnDisconnect\":\"Deallocate\",\"rampUpMinutesToWaitOnDisconnect\":1014248956,\"rampUpActionOnLogoff\":\"Deallocate\",\"rampUpMinutesToWaitOnLogoff\":1964077679,\"peakStartTime\":{\"hour\":325210544,\"minute\":2124129380},\"peakStartVMOnConnect\":\"Disable\",\"peakActionOnDisconnect\":\"Hibernate\",\"peakMinutesToWaitOnDisconnect\":543218524,\"peakActionOnLogoff\":\"Hibernate\",\"peakMinutesToWaitOnLogoff\":150528067,\"rampDownStartTime\":{\"hour\":20952661,\"minute\":1138832682},\"rampDownStartVMOnConnect\":\"Enable\",\"rampDownActionOnDisconnect\":\"None\",\"rampDownMinutesToWaitOnDisconnect\":996292120,\"rampDownActionOnLogoff\":\"None\",\"rampDownMinutesToWaitOnLogoff\":988577798,\"offPeakStartTime\":{\"hour\":290904524,\"minute\":1604128038},\"offPeakStartVMOnConnect\":\"Enable\",\"offPeakActionOnDisconnect\":\"Hibernate\",\"offPeakMinutesToWaitOnDisconnect\":709462942,\"offPeakActionOnLogoff\":\"None\",\"offPeakMinutesToWaitOnLogoff\":1900039321},\"id\":\"rqctmxxdtdd\",\"name\":\"flhuytxzv\",\"type\":\"zna\"}]}"; + + Mockito.when(httpResponse.getStatusCode()).thenReturn(200); + Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); + Mockito + .when(httpResponse.getBody()) + .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); + Mockito + .when(httpResponse.getBodyAsByteArray()) + .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); + Mockito + .when(httpClient.send(httpRequest.capture(), Mockito.any())) + .thenReturn( + Mono + .defer( + () -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + DesktopVirtualizationManager manager = + DesktopVirtualizationManager + .configure() + .withHttpClient(httpClient) + .authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = + manager + .scalingPlanPersonalSchedules() + .list("kfuarenlv", "htkln", 1009916095, false, 672713653, com.azure.core.util.Context.NONE); + + Assertions.assertEquals(DayOfWeek.SATURDAY, response.iterator().next().daysOfWeek().get(0)); + Assertions.assertEquals(1124530948, response.iterator().next().rampUpStartTime().hour()); + Assertions.assertEquals(499319607, response.iterator().next().rampUpStartTime().minute()); + Assertions.assertEquals(StartupBehavior.NONE, response.iterator().next().rampUpAutoStartHosts()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, response.iterator().next().rampUpStartVMOnConnect()); + Assertions + .assertEquals(SessionHandlingOperation.DEALLOCATE, response.iterator().next().rampUpActionOnDisconnect()); + Assertions.assertEquals(1014248956, response.iterator().next().rampUpMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, response.iterator().next().rampUpActionOnLogoff()); + Assertions.assertEquals(1964077679, response.iterator().next().rampUpMinutesToWaitOnLogoff()); + Assertions.assertEquals(325210544, response.iterator().next().peakStartTime().hour()); + Assertions.assertEquals(2124129380, response.iterator().next().peakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.DISABLE, response.iterator().next().peakStartVMOnConnect()); + Assertions + .assertEquals(SessionHandlingOperation.HIBERNATE, response.iterator().next().peakActionOnDisconnect()); + Assertions.assertEquals(543218524, response.iterator().next().peakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.iterator().next().peakActionOnLogoff()); + Assertions.assertEquals(150528067, response.iterator().next().peakMinutesToWaitOnLogoff()); + Assertions.assertEquals(20952661, response.iterator().next().rampDownStartTime().hour()); + Assertions.assertEquals(1138832682, response.iterator().next().rampDownStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, response.iterator().next().rampDownStartVMOnConnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, response.iterator().next().rampDownActionOnDisconnect()); + Assertions.assertEquals(996292120, response.iterator().next().rampDownMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, response.iterator().next().rampDownActionOnLogoff()); + Assertions.assertEquals(988577798, response.iterator().next().rampDownMinutesToWaitOnLogoff()); + Assertions.assertEquals(290904524, response.iterator().next().offPeakStartTime().hour()); + Assertions.assertEquals(1604128038, response.iterator().next().offPeakStartTime().minute()); + Assertions.assertEquals(SetStartVMOnConnect.ENABLE, response.iterator().next().offPeakStartVMOnConnect()); + Assertions + .assertEquals(SessionHandlingOperation.HIBERNATE, response.iterator().next().offPeakActionOnDisconnect()); + Assertions.assertEquals(709462942, response.iterator().next().offPeakMinutesToWaitOnDisconnect()); + Assertions.assertEquals(SessionHandlingOperation.NONE, response.iterator().next().offPeakActionOnLogoff()); + Assertions.assertEquals(1900039321, response.iterator().next().offPeakMinutesToWaitOnLogoff()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleInnerTests.java index cc4296e51eb6..b6faeacb1666 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleInnerTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleInnerTests.java @@ -19,73 +19,75 @@ public void testDeserialize() throws Exception { ScalingPlanPooledScheduleInner model = BinaryData .fromString( - "{\"properties\":{\"daysOfWeek\":[\"Friday\"],\"rampUpStartTime\":{\"hour\":333094369,\"minute\":1110747875},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":1378070116,\"rampUpCapacityThresholdPct\":424623413,\"peakStartTime\":{\"hour\":133898645,\"minute\":45967354},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":969530861,\"minute\":1223607421},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":655680628,\"rampDownCapacityThresholdPct\":198508752,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":1792680801,\"rampDownNotificationMessage\":\"g\",\"offPeakStartTime\":{\"hour\":642461794,\"minute\":799434019},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},\"id\":\"gygev\",\"name\":\"zntypmrb\",\"type\":\"izcdrqjsd\"}") + "{\"properties\":{\"daysOfWeek\":[\"Wednesday\",\"Tuesday\"],\"rampUpStartTime\":{\"hour\":1990735678,\"minute\":876126569},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":138354171,\"rampUpCapacityThresholdPct\":1131914831,\"peakStartTime\":{\"hour\":1267034334,\"minute\":872540735},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":284483918,\"minute\":31023932},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":1662245915,\"rampDownCapacityThresholdPct\":1149825898,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":990417532,\"rampDownNotificationMessage\":\"pjmkhfxobbc\",\"offPeakStartTime\":{\"hour\":198742016,\"minute\":1117876876},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},\"id\":\"riplrbpbewtg\",\"name\":\"fgb\",\"type\":\"c\"}") .toObject(ScalingPlanPooledScheduleInner.class); - Assertions.assertEquals(DayOfWeek.FRIDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(333094369, model.rampUpStartTime().hour()); - Assertions.assertEquals(1110747875, model.rampUpStartTime().minute()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.daysOfWeek().get(0)); + Assertions.assertEquals(1990735678, model.rampUpStartTime().hour()); + Assertions.assertEquals(876126569, model.rampUpStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1378070116, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(424623413, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(133898645, model.peakStartTime().hour()); - Assertions.assertEquals(45967354, model.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(969530861, model.rampDownStartTime().hour()); - Assertions.assertEquals(1223607421, model.rampDownStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(655680628, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(198508752, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, model.rampDownForceLogoffUsers()); + Assertions.assertEquals(138354171, model.rampUpMinimumHostsPct()); + Assertions.assertEquals(1131914831, model.rampUpCapacityThresholdPct()); + Assertions.assertEquals(1267034334, model.peakStartTime().hour()); + Assertions.assertEquals(872540735, model.peakStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.peakLoadBalancingAlgorithm()); + Assertions.assertEquals(284483918, model.rampDownStartTime().hour()); + Assertions.assertEquals(31023932, model.rampDownStartTime().minute()); + Assertions + .assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.rampDownLoadBalancingAlgorithm()); + Assertions.assertEquals(1662245915, model.rampDownMinimumHostsPct()); + Assertions.assertEquals(1149825898, model.rampDownCapacityThresholdPct()); + Assertions.assertEquals(false, model.rampDownForceLogoffUsers()); Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(1792680801, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("g", model.rampDownNotificationMessage()); - Assertions.assertEquals(642461794, model.offPeakStartTime().hour()); - Assertions.assertEquals(799434019, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.offPeakLoadBalancingAlgorithm()); + Assertions.assertEquals(990417532, model.rampDownWaitTimeMinutes()); + Assertions.assertEquals("pjmkhfxobbc", model.rampDownNotificationMessage()); + Assertions.assertEquals(198742016, model.offPeakStartTime().hour()); + Assertions.assertEquals(1117876876, model.offPeakStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.offPeakLoadBalancingAlgorithm()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScalingPlanPooledScheduleInner model = new ScalingPlanPooledScheduleInner() - .withDaysOfWeek(Arrays.asList(DayOfWeek.FRIDAY)) - .withRampUpStartTime(new Time().withHour(333094369).withMinute(1110747875)) + .withDaysOfWeek(Arrays.asList(DayOfWeek.WEDNESDAY, DayOfWeek.TUESDAY)) + .withRampUpStartTime(new Time().withHour(1990735678).withMinute(876126569)) .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(1378070116) - .withRampUpCapacityThresholdPct(424623413) - .withPeakStartTime(new Time().withHour(133898645).withMinute(45967354)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(969530861).withMinute(1223607421)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(655680628) - .withRampDownCapacityThresholdPct(198508752) - .withRampDownForceLogoffUsers(true) + .withRampUpMinimumHostsPct(138354171) + .withRampUpCapacityThresholdPct(1131914831) + .withPeakStartTime(new Time().withHour(1267034334).withMinute(872540735)) + .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampDownStartTime(new Time().withHour(284483918).withMinute(31023932)) + .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampDownMinimumHostsPct(1662245915) + .withRampDownCapacityThresholdPct(1149825898) + .withRampDownForceLogoffUsers(false) .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(1792680801) - .withRampDownNotificationMessage("g") - .withOffPeakStartTime(new Time().withHour(642461794).withMinute(799434019)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST); + .withRampDownWaitTimeMinutes(990417532) + .withRampDownNotificationMessage("pjmkhfxobbc") + .withOffPeakStartTime(new Time().withHour(198742016).withMinute(1117876876)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST); model = BinaryData.fromObject(model).toObject(ScalingPlanPooledScheduleInner.class); - Assertions.assertEquals(DayOfWeek.FRIDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(333094369, model.rampUpStartTime().hour()); - Assertions.assertEquals(1110747875, model.rampUpStartTime().minute()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.daysOfWeek().get(0)); + Assertions.assertEquals(1990735678, model.rampUpStartTime().hour()); + Assertions.assertEquals(876126569, model.rampUpStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1378070116, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(424623413, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(133898645, model.peakStartTime().hour()); - Assertions.assertEquals(45967354, model.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(969530861, model.rampDownStartTime().hour()); - Assertions.assertEquals(1223607421, model.rampDownStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(655680628, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(198508752, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, model.rampDownForceLogoffUsers()); + Assertions.assertEquals(138354171, model.rampUpMinimumHostsPct()); + Assertions.assertEquals(1131914831, model.rampUpCapacityThresholdPct()); + Assertions.assertEquals(1267034334, model.peakStartTime().hour()); + Assertions.assertEquals(872540735, model.peakStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.peakLoadBalancingAlgorithm()); + Assertions.assertEquals(284483918, model.rampDownStartTime().hour()); + Assertions.assertEquals(31023932, model.rampDownStartTime().minute()); + Assertions + .assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.rampDownLoadBalancingAlgorithm()); + Assertions.assertEquals(1662245915, model.rampDownMinimumHostsPct()); + Assertions.assertEquals(1149825898, model.rampDownCapacityThresholdPct()); + Assertions.assertEquals(false, model.rampDownForceLogoffUsers()); Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(1792680801, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("g", model.rampDownNotificationMessage()); - Assertions.assertEquals(642461794, model.offPeakStartTime().hour()); - Assertions.assertEquals(799434019, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.offPeakLoadBalancingAlgorithm()); + Assertions.assertEquals(990417532, model.rampDownWaitTimeMinutes()); + Assertions.assertEquals("pjmkhfxobbc", model.rampDownNotificationMessage()); + Assertions.assertEquals(198742016, model.offPeakStartTime().hour()); + Assertions.assertEquals(1117876876, model.offPeakStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.offPeakLoadBalancingAlgorithm()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleListTests.java index 8fe1d06db2bc..d748fc4e1ed8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleListTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleListTests.java @@ -6,9 +6,11 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleInner; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledScheduleList; import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; +import com.azure.resourcemanager.desktopvirtualization.models.Time; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -18,25 +20,34 @@ public void testDeserialize() throws Exception { ScalingPlanPooledScheduleList model = BinaryData .fromString( - "{\"value\":[{\"properties\":{\"daysOfWeek\":[],\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":989865410,\"rampUpCapacityThresholdPct\":1111271416,\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":956878361,\"rampDownCapacityThresholdPct\":1391467998,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":1493031892,\"rampDownNotificationMessage\":\"klyaxuconu\",\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},\"id\":\"kbeype\",\"name\":\"rmjmwvvjektc\",\"type\":\"senhwlrs\"},{\"properties\":{\"daysOfWeek\":[],\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":1396036166,\"rampUpCapacityThresholdPct\":1792150681,\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":878153378,\"rampDownCapacityThresholdPct\":946081931,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":267259716,\"rampDownNotificationMessage\":\"fcivfsnkym\",\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},\"id\":\"hjfbebrjcxe\",\"name\":\"fuwutttxf\",\"type\":\"jrbirphxepcyv\"}],\"nextLink\":\"fnljky\"}") + "{\"value\":[{\"properties\":{\"daysOfWeek\":[\"Saturday\",\"Thursday\"],\"rampUpStartTime\":{\"hour\":141640204,\"minute\":256612038},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":1243580735,\"rampUpCapacityThresholdPct\":1207917179,\"peakStartTime\":{\"hour\":1413734297,\"minute\":1151827085},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":413444138,\"minute\":1967682720},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":693329650,\"rampDownCapacityThresholdPct\":1596436522,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":2073757128,\"rampDownNotificationMessage\":\"uthnnprnxipeilpj\",\"offPeakStartTime\":{\"hour\":1074564233,\"minute\":115468496},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},\"id\":\"dultskz\",\"name\":\"btdzumveekg\",\"type\":\"wozuhkf\"},{\"properties\":{\"daysOfWeek\":[\"Wednesday\",\"Tuesday\",\"Wednesday\",\"Tuesday\"],\"rampUpStartTime\":{\"hour\":568244971,\"minute\":519560547},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":1856979158,\"rampUpCapacityThresholdPct\":1422945070,\"peakStartTime\":{\"hour\":1252528512,\"minute\":1713449860},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":2116291824,\"minute\":2085364549},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":628545796,\"rampDownCapacityThresholdPct\":643648278,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":1393240700,\"rampDownNotificationMessage\":\"sflhhca\",\"offPeakStartTime\":{\"hour\":131354519,\"minute\":2013755278},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},\"id\":\"isxyawjoyaqcslyj\",\"name\":\"kiidzyex\",\"type\":\"nelixhnrztfo\"}],\"nextLink\":\"bnxknalaulppg\"}") .toObject(ScalingPlanPooledScheduleList.class); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.value().get(0).daysOfWeek().get(0)); + Assertions.assertEquals(141640204, model.value().get(0).rampUpStartTime().hour()); + Assertions.assertEquals(256612038, model.value().get(0).rampUpStartTime().minute()); Assertions .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.value().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(989865410, model.value().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(1111271416, model.value().get(0).rampUpCapacityThresholdPct()); + SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.value().get(0).rampUpLoadBalancingAlgorithm()); + Assertions.assertEquals(1243580735, model.value().get(0).rampUpMinimumHostsPct()); + Assertions.assertEquals(1207917179, model.value().get(0).rampUpCapacityThresholdPct()); + Assertions.assertEquals(1413734297, model.value().get(0).peakStartTime().hour()); + Assertions.assertEquals(1151827085, model.value().get(0).peakStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.value().get(0).peakLoadBalancingAlgorithm()); + Assertions.assertEquals(413444138, model.value().get(0).rampDownStartTime().hour()); + Assertions.assertEquals(1967682720, model.value().get(0).rampDownStartTime().minute()); Assertions .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.value().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(956878361, model.value().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(1391467998, model.value().get(0).rampDownCapacityThresholdPct()); - Assertions.assertEquals(false, model.value().get(0).rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.value().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(1493031892, model.value().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("klyaxuconu", model.value().get(0).rampDownNotificationMessage()); + SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.value().get(0).rampDownLoadBalancingAlgorithm()); + Assertions.assertEquals(693329650, model.value().get(0).rampDownMinimumHostsPct()); + Assertions.assertEquals(1596436522, model.value().get(0).rampDownCapacityThresholdPct()); + Assertions.assertEquals(true, model.value().get(0).rampDownForceLogoffUsers()); + Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.value().get(0).rampDownStopHostsWhen()); + Assertions.assertEquals(2073757128, model.value().get(0).rampDownWaitTimeMinutes()); + Assertions.assertEquals("uthnnprnxipeilpj", model.value().get(0).rampDownNotificationMessage()); + Assertions.assertEquals(1074564233, model.value().get(0).offPeakStartTime().hour()); + Assertions.assertEquals(115468496, model.value().get(0).offPeakStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.value().get(0).offPeakLoadBalancingAlgorithm()); @@ -50,51 +61,74 @@ public void testSerialize() throws Exception { Arrays .asList( new ScalingPlanPooledScheduleInner() - .withDaysOfWeek(Arrays.asList()) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(989865410) - .withRampUpCapacityThresholdPct(1111271416) + .withDaysOfWeek(Arrays.asList(DayOfWeek.SATURDAY, DayOfWeek.THURSDAY)) + .withRampUpStartTime(new Time().withHour(141640204).withMinute(256612038)) + .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampUpMinimumHostsPct(1243580735) + .withRampUpCapacityThresholdPct(1207917179) + .withPeakStartTime(new Time().withHour(1413734297).withMinute(1151827085)) .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownMinimumHostsPct(956878361) - .withRampDownCapacityThresholdPct(1391467998) - .withRampDownForceLogoffUsers(false) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(1493031892) - .withRampDownNotificationMessage("klyaxuconu") + .withRampDownStartTime(new Time().withHour(413444138).withMinute(1967682720)) + .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownMinimumHostsPct(693329650) + .withRampDownCapacityThresholdPct(1596436522) + .withRampDownForceLogoffUsers(true) + .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) + .withRampDownWaitTimeMinutes(2073757128) + .withRampDownNotificationMessage("uthnnprnxipeilpj") + .withOffPeakStartTime(new Time().withHour(1074564233).withMinute(115468496)) .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), new ScalingPlanPooledScheduleInner() - .withDaysOfWeek(Arrays.asList()) + .withDaysOfWeek( + Arrays + .asList( + DayOfWeek.WEDNESDAY, + DayOfWeek.TUESDAY, + DayOfWeek.WEDNESDAY, + DayOfWeek.TUESDAY)) + .withRampUpStartTime(new Time().withHour(568244971).withMinute(519560547)) .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(1396036166) - .withRampUpCapacityThresholdPct(1792150681) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampUpMinimumHostsPct(1856979158) + .withRampUpCapacityThresholdPct(1422945070) + .withPeakStartTime(new Time().withHour(1252528512).withMinute(1713449860)) + .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampDownStartTime(new Time().withHour(2116291824).withMinute(2085364549)) .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(878153378) - .withRampDownCapacityThresholdPct(946081931) + .withRampDownMinimumHostsPct(628545796) + .withRampDownCapacityThresholdPct(643648278) .withRampDownForceLogoffUsers(true) .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(267259716) - .withRampDownNotificationMessage("fcivfsnkym") - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST))); + .withRampDownWaitTimeMinutes(1393240700) + .withRampDownNotificationMessage("sflhhca") + .withOffPeakStartTime(new Time().withHour(131354519).withMinute(2013755278)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST))); model = BinaryData.fromObject(model).toObject(ScalingPlanPooledScheduleList.class); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.value().get(0).daysOfWeek().get(0)); + Assertions.assertEquals(141640204, model.value().get(0).rampUpStartTime().hour()); + Assertions.assertEquals(256612038, model.value().get(0).rampUpStartTime().minute()); Assertions .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.value().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(989865410, model.value().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(1111271416, model.value().get(0).rampUpCapacityThresholdPct()); + SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.value().get(0).rampUpLoadBalancingAlgorithm()); + Assertions.assertEquals(1243580735, model.value().get(0).rampUpMinimumHostsPct()); + Assertions.assertEquals(1207917179, model.value().get(0).rampUpCapacityThresholdPct()); + Assertions.assertEquals(1413734297, model.value().get(0).peakStartTime().hour()); + Assertions.assertEquals(1151827085, model.value().get(0).peakStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.value().get(0).peakLoadBalancingAlgorithm()); + Assertions.assertEquals(413444138, model.value().get(0).rampDownStartTime().hour()); + Assertions.assertEquals(1967682720, model.value().get(0).rampDownStartTime().minute()); Assertions .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.value().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(956878361, model.value().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(1391467998, model.value().get(0).rampDownCapacityThresholdPct()); - Assertions.assertEquals(false, model.value().get(0).rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.value().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(1493031892, model.value().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("klyaxuconu", model.value().get(0).rampDownNotificationMessage()); + SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.value().get(0).rampDownLoadBalancingAlgorithm()); + Assertions.assertEquals(693329650, model.value().get(0).rampDownMinimumHostsPct()); + Assertions.assertEquals(1596436522, model.value().get(0).rampDownCapacityThresholdPct()); + Assertions.assertEquals(true, model.value().get(0).rampDownForceLogoffUsers()); + Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.value().get(0).rampDownStopHostsWhen()); + Assertions.assertEquals(2073757128, model.value().get(0).rampDownWaitTimeMinutes()); + Assertions.assertEquals("uthnnprnxipeilpj", model.value().get(0).rampDownNotificationMessage()); + Assertions.assertEquals(1074564233, model.value().get(0).offPeakStartTime().hour()); + Assertions.assertEquals(115468496, model.value().get(0).offPeakStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.value().get(0).offPeakLoadBalancingAlgorithm()); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePatchTests.java index 2cc548f4081d..b57bbe5f73b8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePatchTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePatchTests.java @@ -19,73 +19,73 @@ public void testDeserialize() throws Exception { ScalingPlanPooledSchedulePatch model = BinaryData .fromString( - "{\"properties\":{\"daysOfWeek\":[\"Thursday\",\"Saturday\"],\"rampUpStartTime\":{\"hour\":605545221,\"minute\":44381208},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":1148741426,\"rampUpCapacityThresholdPct\":390798331,\"peakStartTime\":{\"hour\":1456647445,\"minute\":353771493},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":1446067033,\"minute\":248274393},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":583460875,\"rampDownCapacityThresholdPct\":1192449755,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":895884461,\"rampDownNotificationMessage\":\"mryw\",\"offPeakStartTime\":{\"hour\":2134987728,\"minute\":1133422967},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},\"id\":\"tiyqzrnkcqv\",\"name\":\"xlwhzlsicoh\",\"type\":\"qqn\"}") + "{\"properties\":{\"daysOfWeek\":[\"Saturday\"],\"rampUpStartTime\":{\"hour\":391776168,\"minute\":2086388671},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":2051758056,\"rampUpCapacityThresholdPct\":1378087535,\"peakStartTime\":{\"hour\":439169956,\"minute\":1264115895},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":92762624,\"minute\":63686383},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1220568259,\"rampDownCapacityThresholdPct\":810124654,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":2067966148,\"rampDownNotificationMessage\":\"rwmdyvxqtay\",\"offPeakStartTime\":{\"hour\":357638492,\"minute\":1013122573},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},\"id\":\"yqbexrmcqibycno\",\"name\":\"v\",\"type\":\"nmefqsgzvahapj\"}") .toObject(ScalingPlanPooledSchedulePatch.class); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(605545221, model.rampUpStartTime().hour()); - Assertions.assertEquals(44381208, model.rampUpStartTime().minute()); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.daysOfWeek().get(0)); + Assertions.assertEquals(391776168, model.rampUpStartTime().hour()); + Assertions.assertEquals(2086388671, model.rampUpStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1148741426, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(390798331, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(1456647445, model.peakStartTime().hour()); - Assertions.assertEquals(353771493, model.peakStartTime().minute()); + Assertions.assertEquals(2051758056, model.rampUpMinimumHostsPct()); + Assertions.assertEquals(1378087535, model.rampUpCapacityThresholdPct()); + Assertions.assertEquals(439169956, model.peakStartTime().hour()); + Assertions.assertEquals(1264115895, model.peakStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(1446067033, model.rampDownStartTime().hour()); - Assertions.assertEquals(248274393, model.rampDownStartTime().minute()); + Assertions.assertEquals(92762624, model.rampDownStartTime().hour()); + Assertions.assertEquals(63686383, model.rampDownStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(583460875, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(1192449755, model.rampDownCapacityThresholdPct()); + Assertions.assertEquals(1220568259, model.rampDownMinimumHostsPct()); + Assertions.assertEquals(810124654, model.rampDownCapacityThresholdPct()); Assertions.assertEquals(true, model.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(895884461, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("mryw", model.rampDownNotificationMessage()); - Assertions.assertEquals(2134987728, model.offPeakStartTime().hour()); - Assertions.assertEquals(1133422967, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.offPeakLoadBalancingAlgorithm()); + Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.rampDownStopHostsWhen()); + Assertions.assertEquals(2067966148, model.rampDownWaitTimeMinutes()); + Assertions.assertEquals("rwmdyvxqtay", model.rampDownNotificationMessage()); + Assertions.assertEquals(357638492, model.offPeakStartTime().hour()); + Assertions.assertEquals(1013122573, model.offPeakStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.offPeakLoadBalancingAlgorithm()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScalingPlanPooledSchedulePatch model = new ScalingPlanPooledSchedulePatch() - .withDaysOfWeek(Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.SATURDAY)) - .withRampUpStartTime(new Time().withHour(605545221).withMinute(44381208)) + .withDaysOfWeek(Arrays.asList(DayOfWeek.SATURDAY)) + .withRampUpStartTime(new Time().withHour(391776168).withMinute(2086388671)) .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(1148741426) - .withRampUpCapacityThresholdPct(390798331) - .withPeakStartTime(new Time().withHour(1456647445).withMinute(353771493)) + .withRampUpMinimumHostsPct(2051758056) + .withRampUpCapacityThresholdPct(1378087535) + .withPeakStartTime(new Time().withHour(439169956).withMinute(1264115895)) .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(1446067033).withMinute(248274393)) + .withRampDownStartTime(new Time().withHour(92762624).withMinute(63686383)) .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(583460875) - .withRampDownCapacityThresholdPct(1192449755) + .withRampDownMinimumHostsPct(1220568259) + .withRampDownCapacityThresholdPct(810124654) .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(895884461) - .withRampDownNotificationMessage("mryw") - .withOffPeakStartTime(new Time().withHour(2134987728).withMinute(1133422967)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST); + .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) + .withRampDownWaitTimeMinutes(2067966148) + .withRampDownNotificationMessage("rwmdyvxqtay") + .withOffPeakStartTime(new Time().withHour(357638492).withMinute(1013122573)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST); model = BinaryData.fromObject(model).toObject(ScalingPlanPooledSchedulePatch.class); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(605545221, model.rampUpStartTime().hour()); - Assertions.assertEquals(44381208, model.rampUpStartTime().minute()); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.daysOfWeek().get(0)); + Assertions.assertEquals(391776168, model.rampUpStartTime().hour()); + Assertions.assertEquals(2086388671, model.rampUpStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1148741426, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(390798331, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(1456647445, model.peakStartTime().hour()); - Assertions.assertEquals(353771493, model.peakStartTime().minute()); + Assertions.assertEquals(2051758056, model.rampUpMinimumHostsPct()); + Assertions.assertEquals(1378087535, model.rampUpCapacityThresholdPct()); + Assertions.assertEquals(439169956, model.peakStartTime().hour()); + Assertions.assertEquals(1264115895, model.peakStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(1446067033, model.rampDownStartTime().hour()); - Assertions.assertEquals(248274393, model.rampDownStartTime().minute()); + Assertions.assertEquals(92762624, model.rampDownStartTime().hour()); + Assertions.assertEquals(63686383, model.rampDownStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(583460875, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(1192449755, model.rampDownCapacityThresholdPct()); + Assertions.assertEquals(1220568259, model.rampDownMinimumHostsPct()); + Assertions.assertEquals(810124654, model.rampDownCapacityThresholdPct()); Assertions.assertEquals(true, model.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(895884461, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("mryw", model.rampDownNotificationMessage()); - Assertions.assertEquals(2134987728, model.offPeakStartTime().hour()); - Assertions.assertEquals(1133422967, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.offPeakLoadBalancingAlgorithm()); + Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.rampDownStopHostsWhen()); + Assertions.assertEquals(2067966148, model.rampDownWaitTimeMinutes()); + Assertions.assertEquals("rwmdyvxqtay", model.rampDownNotificationMessage()); + Assertions.assertEquals(357638492, model.offPeakStartTime().hour()); + Assertions.assertEquals(1013122573, model.offPeakStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.offPeakLoadBalancingAlgorithm()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePropertiesTests.java index 7e9d66302fc6..351569ba4904 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePropertiesTests.java @@ -19,29 +19,29 @@ public void testDeserialize() throws Exception { ScalingPlanPooledScheduleProperties model = BinaryData .fromString( - "{\"daysOfWeek\":[\"Wednesday\",\"Wednesday\",\"Friday\",\"Saturday\"],\"rampUpStartTime\":{\"hour\":435987287,\"minute\":1665159346},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":382213486,\"rampUpCapacityThresholdPct\":947981025,\"peakStartTime\":{\"hour\":1718564660,\"minute\":746400217},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":1037618415,\"minute\":362966046},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1027327550,\"rampDownCapacityThresholdPct\":22083476,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":558148580,\"rampDownNotificationMessage\":\"eyeam\",\"offPeakStartTime\":{\"hour\":1616519742,\"minute\":1995660983},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"}") + "{\"daysOfWeek\":[\"Sunday\",\"Sunday\",\"Wednesday\",\"Friday\"],\"rampUpStartTime\":{\"hour\":1837116433,\"minute\":2103137599},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":1432172672,\"rampUpCapacityThresholdPct\":795071177,\"peakStartTime\":{\"hour\":1806292295,\"minute\":1451066007},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":1742737473,\"minute\":1258750458},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1232796575,\"rampDownCapacityThresholdPct\":1519275761,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":1428727987,\"rampDownNotificationMessage\":\"j\",\"offPeakStartTime\":{\"hour\":1115460475,\"minute\":47396428},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"}") .toObject(ScalingPlanPooledScheduleProperties.class); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(435987287, model.rampUpStartTime().hour()); - Assertions.assertEquals(1665159346, model.rampUpStartTime().minute()); + Assertions.assertEquals(DayOfWeek.SUNDAY, model.daysOfWeek().get(0)); + Assertions.assertEquals(1837116433, model.rampUpStartTime().hour()); + Assertions.assertEquals(2103137599, model.rampUpStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(382213486, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(947981025, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(1718564660, model.peakStartTime().hour()); - Assertions.assertEquals(746400217, model.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(1037618415, model.rampDownStartTime().hour()); - Assertions.assertEquals(362966046, model.rampDownStartTime().minute()); + Assertions.assertEquals(1432172672, model.rampUpMinimumHostsPct()); + Assertions.assertEquals(795071177, model.rampUpCapacityThresholdPct()); + Assertions.assertEquals(1806292295, model.peakStartTime().hour()); + Assertions.assertEquals(1451066007, model.peakStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.peakLoadBalancingAlgorithm()); + Assertions.assertEquals(1742737473, model.rampDownStartTime().hour()); + Assertions.assertEquals(1258750458, model.rampDownStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1027327550, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(22083476, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(false, model.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(558148580, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("eyeam", model.rampDownNotificationMessage()); - Assertions.assertEquals(1616519742, model.offPeakStartTime().hour()); - Assertions.assertEquals(1995660983, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.offPeakLoadBalancingAlgorithm()); + Assertions.assertEquals(1232796575, model.rampDownMinimumHostsPct()); + Assertions.assertEquals(1519275761, model.rampDownCapacityThresholdPct()); + Assertions.assertEquals(true, model.rampDownForceLogoffUsers()); + Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.rampDownStopHostsWhen()); + Assertions.assertEquals(1428727987, model.rampDownWaitTimeMinutes()); + Assertions.assertEquals("j", model.rampDownNotificationMessage()); + Assertions.assertEquals(1115460475, model.offPeakStartTime().hour()); + Assertions.assertEquals(47396428, model.offPeakStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.offPeakLoadBalancingAlgorithm()); } @org.junit.jupiter.api.Test @@ -49,44 +49,44 @@ public void testSerialize() throws Exception { ScalingPlanPooledScheduleProperties model = new ScalingPlanPooledScheduleProperties() .withDaysOfWeek( - Arrays.asList(DayOfWeek.WEDNESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.FRIDAY, DayOfWeek.SATURDAY)) - .withRampUpStartTime(new Time().withHour(435987287).withMinute(1665159346)) + Arrays.asList(DayOfWeek.SUNDAY, DayOfWeek.SUNDAY, DayOfWeek.WEDNESDAY, DayOfWeek.FRIDAY)) + .withRampUpStartTime(new Time().withHour(1837116433).withMinute(2103137599)) .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(382213486) - .withRampUpCapacityThresholdPct(947981025) - .withPeakStartTime(new Time().withHour(1718564660).withMinute(746400217)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownStartTime(new Time().withHour(1037618415).withMinute(362966046)) + .withRampUpMinimumHostsPct(1432172672) + .withRampUpCapacityThresholdPct(795071177) + .withPeakStartTime(new Time().withHour(1806292295).withMinute(1451066007)) + .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownStartTime(new Time().withHour(1742737473).withMinute(1258750458)) .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(1027327550) - .withRampDownCapacityThresholdPct(22083476) - .withRampDownForceLogoffUsers(false) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(558148580) - .withRampDownNotificationMessage("eyeam") - .withOffPeakStartTime(new Time().withHour(1616519742).withMinute(1995660983)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST); + .withRampDownMinimumHostsPct(1232796575) + .withRampDownCapacityThresholdPct(1519275761) + .withRampDownForceLogoffUsers(true) + .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) + .withRampDownWaitTimeMinutes(1428727987) + .withRampDownNotificationMessage("j") + .withOffPeakStartTime(new Time().withHour(1115460475).withMinute(47396428)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST); model = BinaryData.fromObject(model).toObject(ScalingPlanPooledScheduleProperties.class); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(435987287, model.rampUpStartTime().hour()); - Assertions.assertEquals(1665159346, model.rampUpStartTime().minute()); + Assertions.assertEquals(DayOfWeek.SUNDAY, model.daysOfWeek().get(0)); + Assertions.assertEquals(1837116433, model.rampUpStartTime().hour()); + Assertions.assertEquals(2103137599, model.rampUpStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(382213486, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(947981025, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(1718564660, model.peakStartTime().hour()); - Assertions.assertEquals(746400217, model.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(1037618415, model.rampDownStartTime().hour()); - Assertions.assertEquals(362966046, model.rampDownStartTime().minute()); + Assertions.assertEquals(1432172672, model.rampUpMinimumHostsPct()); + Assertions.assertEquals(795071177, model.rampUpCapacityThresholdPct()); + Assertions.assertEquals(1806292295, model.peakStartTime().hour()); + Assertions.assertEquals(1451066007, model.peakStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.peakLoadBalancingAlgorithm()); + Assertions.assertEquals(1742737473, model.rampDownStartTime().hour()); + Assertions.assertEquals(1258750458, model.rampDownStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1027327550, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(22083476, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(false, model.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(558148580, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("eyeam", model.rampDownNotificationMessage()); - Assertions.assertEquals(1616519742, model.offPeakStartTime().hour()); - Assertions.assertEquals(1995660983, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.offPeakLoadBalancingAlgorithm()); + Assertions.assertEquals(1232796575, model.rampDownMinimumHostsPct()); + Assertions.assertEquals(1519275761, model.rampDownCapacityThresholdPct()); + Assertions.assertEquals(true, model.rampDownForceLogoffUsers()); + Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.rampDownStopHostsWhen()); + Assertions.assertEquals(1428727987, model.rampDownWaitTimeMinutes()); + Assertions.assertEquals("j", model.rampDownNotificationMessage()); + Assertions.assertEquals(1115460475, model.offPeakStartTime().hour()); + Assertions.assertEquals(47396428, model.offPeakStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.offPeakLoadBalancingAlgorithm()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateWithResponseMockTests.java index e1af402b2bdc..6bbca30e8f37 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateWithResponseMockTests.java @@ -36,7 +36,7 @@ public void testCreateWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"daysOfWeek\":[\"Monday\",\"Monday\"],\"rampUpStartTime\":{\"hour\":1573137323,\"minute\":344427986},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":685064266,\"rampUpCapacityThresholdPct\":1207165403,\"peakStartTime\":{\"hour\":670431250,\"minute\":25072478},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":990480911,\"minute\":1145117333},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1975492763,\"rampDownCapacityThresholdPct\":169373915,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":2094473580,\"rampDownNotificationMessage\":\"ykvgtrdcnifmz\",\"offPeakStartTime\":{\"hour\":1867951005,\"minute\":1409785918},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},\"id\":\"rnysux\",\"name\":\"prafwgckhoc\",\"type\":\"vdff\"}"; + "{\"properties\":{\"daysOfWeek\":[\"Monday\",\"Sunday\"],\"rampUpStartTime\":{\"hour\":1533653283,\"minute\":1984178161},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":830964876,\"rampUpCapacityThresholdPct\":1152619521,\"peakStartTime\":{\"hour\":1614916869,\"minute\":1479987429},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":915914475,\"minute\":875433562},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":817459269,\"rampDownCapacityThresholdPct\":449882255,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":689120218,\"rampDownNotificationMessage\":\"rsxypruuu\",\"offPeakStartTime\":{\"hour\":694984034,\"minute\":1409089319},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},\"id\":\"szizoyuelyetndnb\",\"name\":\"qyggagfl\",\"type\":\"lgmtrwahzjmucf\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -67,48 +67,50 @@ public void testCreateWithResponse() throws Exception { ScalingPlanPooledSchedule response = manager .scalingPlanPooledSchedules() - .define("qyuvvfonkp") - .withExistingScalingPlan("zysdzh", "zwwva") - .withDaysOfWeek(Arrays.asList(DayOfWeek.FRIDAY)) - .withRampUpStartTime(new Time().withHour(687861741).withMinute(151532826)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(909531601) - .withRampUpCapacityThresholdPct(808991328) - .withPeakStartTime(new Time().withHour(1578594338).withMinute(712290061)) + .define("n") + .withExistingScalingPlan("wkffdjkt", "ysidfvclgl") + .withDaysOfWeek( + Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.SATURDAY, DayOfWeek.THURSDAY, DayOfWeek.TUESDAY)) + .withRampUpStartTime(new Time().withHour(1043687593).withMinute(939102144)) + .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampUpMinimumHostsPct(1112160542) + .withRampUpCapacityThresholdPct(1510144840) + .withPeakStartTime(new Time().withHour(869245621).withMinute(1717573357)) .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownStartTime(new Time().withHour(305978693).withMinute(1373594000)) + .withRampDownStartTime(new Time().withHour(1168191195).withMinute(1139641337)) .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownMinimumHostsPct(2120109491) - .withRampDownCapacityThresholdPct(1869546664) - .withRampDownForceLogoffUsers(true) + .withRampDownMinimumHostsPct(312700114) + .withRampDownCapacityThresholdPct(972711473) + .withRampDownForceLogoffUsers(false) .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(576086700) - .withRampDownNotificationMessage("gsgbdhuzq") - .withOffPeakStartTime(new Time().withHour(41953991).withMinute(1926562658)) + .withRampDownWaitTimeMinutes(846546082) + .withRampDownNotificationMessage("tvwkpqhjpenu") + .withOffPeakStartTime(new Time().withHour(1710915481).withMinute(1781943414)) .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) .create(); Assertions.assertEquals(DayOfWeek.MONDAY, response.daysOfWeek().get(0)); - Assertions.assertEquals(1573137323, response.rampUpStartTime().hour()); - Assertions.assertEquals(344427986, response.rampUpStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, response.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(685064266, response.rampUpMinimumHostsPct()); - Assertions.assertEquals(1207165403, response.rampUpCapacityThresholdPct()); - Assertions.assertEquals(670431250, response.peakStartTime().hour()); - Assertions.assertEquals(25072478, response.peakStartTime().minute()); + Assertions.assertEquals(1533653283, response.rampUpStartTime().hour()); + Assertions.assertEquals(1984178161, response.rampUpStartTime().minute()); + Assertions + .assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.rampUpLoadBalancingAlgorithm()); + Assertions.assertEquals(830964876, response.rampUpMinimumHostsPct()); + Assertions.assertEquals(1152619521, response.rampUpCapacityThresholdPct()); + Assertions.assertEquals(1614916869, response.peakStartTime().hour()); + Assertions.assertEquals(1479987429, response.peakStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(990480911, response.rampDownStartTime().hour()); - Assertions.assertEquals(1145117333, response.rampDownStartTime().minute()); + Assertions.assertEquals(915914475, response.rampDownStartTime().hour()); + Assertions.assertEquals(875433562, response.rampDownStartTime().minute()); Assertions .assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, response.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1975492763, response.rampDownMinimumHostsPct()); - Assertions.assertEquals(169373915, response.rampDownCapacityThresholdPct()); + Assertions.assertEquals(817459269, response.rampDownMinimumHostsPct()); + Assertions.assertEquals(449882255, response.rampDownCapacityThresholdPct()); Assertions.assertEquals(false, response.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, response.rampDownStopHostsWhen()); - Assertions.assertEquals(2094473580, response.rampDownWaitTimeMinutes()); - Assertions.assertEquals("ykvgtrdcnifmz", response.rampDownNotificationMessage()); - Assertions.assertEquals(1867951005, response.offPeakStartTime().hour()); - Assertions.assertEquals(1409785918, response.offPeakStartTime().minute()); + Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, response.rampDownStopHostsWhen()); + Assertions.assertEquals(689120218, response.rampDownWaitTimeMinutes()); + Assertions.assertEquals("rsxypruuu", response.rampDownNotificationMessage()); + Assertions.assertEquals(694984034, response.offPeakStartTime().hour()); + Assertions.assertEquals(1409089319, response.offPeakStartTime().minute()); Assertions .assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.offPeakLoadBalancingAlgorithm()); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteWithResponseMockTests.java index 15cc5e521e36..5f6819bded3a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteWithResponseMockTests.java @@ -58,6 +58,6 @@ public void testDeleteWithResponse() throws Exception { manager .scalingPlanPooledSchedules() - .deleteWithResponse("zgkrvqe", "vtoepryutnw", "tpzdmovzvfvaawzq", com.azure.core.util.Context.NONE); + .deleteWithResponse("qzeqyjleziunjxdf", "antkwcegyamlbns", "qa", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetWithResponseMockTests.java index 5f4f109f8c62..7b7cf668e24b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetWithResponseMockTests.java @@ -34,7 +34,7 @@ public void testGetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"daysOfWeek\":[\"Friday\",\"Friday\",\"Sunday\",\"Friday\"],\"rampUpStartTime\":{\"hour\":570295898,\"minute\":922777},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":337262867,\"rampUpCapacityThresholdPct\":1351559139,\"peakStartTime\":{\"hour\":1811256055,\"minute\":1514832740},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":646254417,\"minute\":698504930},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":1482669533,\"rampDownCapacityThresholdPct\":159855339,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":1620250081,\"rampDownNotificationMessage\":\"iycslevuf\",\"offPeakStartTime\":{\"hour\":1863886155,\"minute\":1143602550},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},\"id\":\"yhjtqedcgzu\",\"name\":\"wmmrq\",\"type\":\"zrrjvpgly\"}"; + "{\"properties\":{\"daysOfWeek\":[\"Wednesday\",\"Tuesday\",\"Tuesday\",\"Sunday\"],\"rampUpStartTime\":{\"hour\":808082616,\"minute\":146690608},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":1751850154,\"rampUpCapacityThresholdPct\":612007503,\"peakStartTime\":{\"hour\":2085427407,\"minute\":928121621},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":844035132,\"minute\":1145439736},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":1395211030,\"rampDownCapacityThresholdPct\":97372344,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":1945298143,\"rampDownNotificationMessage\":\"gtdysnaqu\",\"offPeakStartTime\":{\"hour\":1842048438,\"minute\":1011075581},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},\"id\":\"q\",\"name\":\"amz\",\"type\":\"rwd\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -65,31 +65,32 @@ public void testGetWithResponse() throws Exception { ScalingPlanPooledSchedule response = manager .scalingPlanPooledSchedules() - .getWithResponse("xjrk", "mbtrnegvmnvu", "eqvldspast", com.azure.core.util.Context.NONE) + .getWithResponse("wnjlxu", "rhwpus", "jbaqehgpdoh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(DayOfWeek.FRIDAY, response.daysOfWeek().get(0)); - Assertions.assertEquals(570295898, response.rampUpStartTime().hour()); - Assertions.assertEquals(922777, response.rampUpStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, response.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(337262867, response.rampUpMinimumHostsPct()); - Assertions.assertEquals(1351559139, response.rampUpCapacityThresholdPct()); - Assertions.assertEquals(1811256055, response.peakStartTime().hour()); - Assertions.assertEquals(1514832740, response.peakStartTime().minute()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, response.daysOfWeek().get(0)); + Assertions.assertEquals(808082616, response.rampUpStartTime().hour()); + Assertions.assertEquals(146690608, response.rampUpStartTime().minute()); + Assertions + .assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.rampUpLoadBalancingAlgorithm()); + Assertions.assertEquals(1751850154, response.rampUpMinimumHostsPct()); + Assertions.assertEquals(612007503, response.rampUpCapacityThresholdPct()); + Assertions.assertEquals(2085427407, response.peakStartTime().hour()); + Assertions.assertEquals(928121621, response.peakStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, response.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(646254417, response.rampDownStartTime().hour()); - Assertions.assertEquals(698504930, response.rampDownStartTime().minute()); + Assertions.assertEquals(844035132, response.rampDownStartTime().hour()); + Assertions.assertEquals(1145439736, response.rampDownStartTime().minute()); Assertions .assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1482669533, response.rampDownMinimumHostsPct()); - Assertions.assertEquals(159855339, response.rampDownCapacityThresholdPct()); + Assertions.assertEquals(1395211030, response.rampDownMinimumHostsPct()); + Assertions.assertEquals(97372344, response.rampDownCapacityThresholdPct()); Assertions.assertEquals(true, response.rampDownForceLogoffUsers()); Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, response.rampDownStopHostsWhen()); - Assertions.assertEquals(1620250081, response.rampDownWaitTimeMinutes()); - Assertions.assertEquals("iycslevuf", response.rampDownNotificationMessage()); - Assertions.assertEquals(1863886155, response.offPeakStartTime().hour()); - Assertions.assertEquals(1143602550, response.offPeakStartTime().minute()); + Assertions.assertEquals(1945298143, response.rampDownWaitTimeMinutes()); + Assertions.assertEquals("gtdysnaqu", response.rampDownNotificationMessage()); + Assertions.assertEquals(1842048438, response.offPeakStartTime().hour()); + Assertions.assertEquals(1011075581, response.offPeakStartTime().minute()); Assertions - .assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.offPeakLoadBalancingAlgorithm()); + .assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, response.offPeakLoadBalancingAlgorithm()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListMockTests.java index 4520ba5458ad..7d660e00180e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListMockTests.java @@ -35,7 +35,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"properties\":{\"daysOfWeek\":[\"Wednesday\"],\"rampUpStartTime\":{\"hour\":443285023,\"minute\":763019330},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":1135591058,\"rampUpCapacityThresholdPct\":1646739085,\"peakStartTime\":{\"hour\":2041776052,\"minute\":1047219235},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":816651113,\"minute\":1115944872},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":1109916167,\"rampDownCapacityThresholdPct\":1534769936,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":47458099,\"rampDownNotificationMessage\":\"lboxqvkjl\",\"offPeakStartTime\":{\"hour\":498716082,\"minute\":1222660339},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},\"id\":\"ynhdwdigum\",\"name\":\"nraauzz\",\"type\":\"tj\"}]}"; + "{\"value\":[{\"properties\":{\"daysOfWeek\":[\"Sunday\",\"Thursday\",\"Thursday\"],\"rampUpStartTime\":{\"hour\":1749280590,\"minute\":720786123},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":1489010807,\"rampUpCapacityThresholdPct\":1872407270,\"peakStartTime\":{\"hour\":807818343,\"minute\":468087914},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":1329198912,\"minute\":1292218152},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":1596109972,\"rampDownCapacityThresholdPct\":148028664,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":41278512,\"rampDownNotificationMessage\":\"cjkgdirazftxej\",\"offPeakStartTime\":{\"hour\":1368771016,\"minute\":1529285659},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},\"id\":\"jtmvc\",\"name\":\"pexcmjurbuhh\",\"type\":\"kyqltqsrogt\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -66,37 +66,37 @@ public void testList() throws Exception { PagedIterable response = manager .scalingPlanPooledSchedules() - .list("dflgzuri", "laecxndticok", 675680646, true, 635512255, com.azure.core.util.Context.NONE); + .list("jjvpilguooqja", "m", 1068210919, false, 1892935943, com.azure.core.util.Context.NONE); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, response.iterator().next().daysOfWeek().get(0)); - Assertions.assertEquals(443285023, response.iterator().next().rampUpStartTime().hour()); - Assertions.assertEquals(763019330, response.iterator().next().rampUpStartTime().minute()); + Assertions.assertEquals(DayOfWeek.SUNDAY, response.iterator().next().daysOfWeek().get(0)); + Assertions.assertEquals(1749280590, response.iterator().next().rampUpStartTime().hour()); + Assertions.assertEquals(720786123, response.iterator().next().rampUpStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, response.iterator().next().rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1135591058, response.iterator().next().rampUpMinimumHostsPct()); - Assertions.assertEquals(1646739085, response.iterator().next().rampUpCapacityThresholdPct()); - Assertions.assertEquals(2041776052, response.iterator().next().peakStartTime().hour()); - Assertions.assertEquals(1047219235, response.iterator().next().peakStartTime().minute()); + Assertions.assertEquals(1489010807, response.iterator().next().rampUpMinimumHostsPct()); + Assertions.assertEquals(1872407270, response.iterator().next().rampUpCapacityThresholdPct()); + Assertions.assertEquals(807818343, response.iterator().next().peakStartTime().hour()); + Assertions.assertEquals(468087914, response.iterator().next().peakStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.iterator().next().peakLoadBalancingAlgorithm()); - Assertions.assertEquals(816651113, response.iterator().next().rampDownStartTime().hour()); - Assertions.assertEquals(1115944872, response.iterator().next().rampDownStartTime().minute()); + Assertions.assertEquals(1329198912, response.iterator().next().rampDownStartTime().hour()); + Assertions.assertEquals(1292218152, response.iterator().next().rampDownStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.iterator().next().rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1109916167, response.iterator().next().rampDownMinimumHostsPct()); - Assertions.assertEquals(1534769936, response.iterator().next().rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, response.iterator().next().rampDownForceLogoffUsers()); + Assertions.assertEquals(1596109972, response.iterator().next().rampDownMinimumHostsPct()); + Assertions.assertEquals(148028664, response.iterator().next().rampDownCapacityThresholdPct()); + Assertions.assertEquals(false, response.iterator().next().rampDownForceLogoffUsers()); Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, response.iterator().next().rampDownStopHostsWhen()); - Assertions.assertEquals(47458099, response.iterator().next().rampDownWaitTimeMinutes()); - Assertions.assertEquals("lboxqvkjl", response.iterator().next().rampDownNotificationMessage()); - Assertions.assertEquals(498716082, response.iterator().next().offPeakStartTime().hour()); - Assertions.assertEquals(1222660339, response.iterator().next().offPeakStartTime().minute()); + Assertions.assertEquals(41278512, response.iterator().next().rampDownWaitTimeMinutes()); + Assertions.assertEquals("cjkgdirazftxej", response.iterator().next().rampDownNotificationMessage()); + Assertions.assertEquals(1368771016, response.iterator().next().offPeakStartTime().hour()); + Assertions.assertEquals(1529285659, response.iterator().next().offPeakStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPropertiesTests.java index 2ea7d2c6e188..75dca3835473 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPropertiesTests.java @@ -22,197 +22,179 @@ public void testDeserialize() throws Exception { ScalingPlanProperties model = BinaryData .fromString( - "{\"objectId\":\"q\",\"description\":\"khixuigdtopbo\",\"friendlyName\":\"og\",\"timeZone\":\"m\",\"hostPoolType\":\"Pooled\",\"exclusionTag\":\"m\",\"schedules\":[{\"name\":\"z\",\"daysOfWeek\":[\"Tuesday\",\"Friday\",\"Thursday\"],\"rampUpStartTime\":{\"hour\":1906806316,\"minute\":1605476123},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":1330318957,\"rampUpCapacityThresholdPct\":1706248091,\"peakStartTime\":{\"hour\":1659633182,\"minute\":1980414786},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":496425950,\"minute\":2113328566},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1915071310,\"rampDownCapacityThresholdPct\":628151950,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":1069562904,\"rampDownNotificationMessage\":\"dqmidtt\",\"offPeakStartTime\":{\"hour\":1570785735,\"minute\":1160468590},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},{\"name\":\"abhjybi\",\"daysOfWeek\":[\"Saturday\"],\"rampUpStartTime\":{\"hour\":384321349,\"minute\":1256732319},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":1382683860,\"rampUpCapacityThresholdPct\":465330089,\"peakStartTime\":{\"hour\":339779256,\"minute\":1420716073},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":104949992,\"minute\":1785723021},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":616844240,\"rampDownCapacityThresholdPct\":1328534140,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":1043685699,\"rampDownNotificationMessage\":\"hzgpphrcgyncocpe\",\"offPeakStartTime\":{\"hour\":1965722470,\"minute\":80244831},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},{\"name\":\"ofsx\",\"daysOfWeek\":[\"Monday\",\"Wednesday\"],\"rampUpStartTime\":{\"hour\":11463195,\"minute\":1397850949},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":1593493877,\"rampUpCapacityThresholdPct\":27534889,\"peakStartTime\":{\"hour\":591177451,\"minute\":1896643633},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":699585009,\"minute\":1951754582},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":211064208,\"rampDownCapacityThresholdPct\":1916526415,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":1569035417,\"rampDownNotificationMessage\":\"ionle\",\"offPeakStartTime\":{\"hour\":783809750,\"minute\":1131419469},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},{\"name\":\"zxdpnqbqqw\",\"daysOfWeek\":[\"Friday\",\"Monday\",\"Monday\"],\"rampUpStartTime\":{\"hour\":61111335,\"minute\":89405990},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":1586389833,\"rampUpCapacityThresholdPct\":141642169,\"peakStartTime\":{\"hour\":1641702766,\"minute\":2067310250},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":1769886925,\"minute\":409786419},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":86962705,\"rampDownCapacityThresholdPct\":611724458,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":1004687873,\"rampDownNotificationMessage\":\"bonqvpkvlrxnjeas\",\"offPeakStartTime\":{\"hour\":625674029,\"minute\":1902616098},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"}],\"hostPoolReferences\":[{\"hostPoolArmPath\":\"keyyi\",\"scalingPlanEnabled\":true},{\"hostPoolArmPath\":\"dlwtgrhpdj\",\"scalingPlanEnabled\":true}]}") + "{\"objectId\":\"aos\",\"description\":\"xc\",\"friendlyName\":\"npc\",\"timeZone\":\"hocohslkev\",\"hostPoolType\":\"Pooled\",\"exclusionTag\":\"zfbuhf\",\"schedules\":[{\"name\":\"x\",\"daysOfWeek\":[\"Sunday\",\"Saturday\",\"Wednesday\"],\"rampUpStartTime\":{\"hour\":378191098,\"minute\":1914432251},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":511745945,\"rampUpCapacityThresholdPct\":72720177,\"peakStartTime\":{\"hour\":1090911341,\"minute\":516508763},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":2099560460,\"minute\":63743502},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":852408036,\"rampDownCapacityThresholdPct\":1533389693,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":849896725,\"rampDownNotificationMessage\":\"jx\",\"offPeakStartTime\":{\"hour\":2030028307,\"minute\":953955678},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},{\"name\":\"ptkoenkoukn\",\"daysOfWeek\":[\"Monday\",\"Saturday\",\"Thursday\",\"Saturday\"],\"rampUpStartTime\":{\"hour\":133898645,\"minute\":45967354},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":969530861,\"rampUpCapacityThresholdPct\":626726522,\"peakStartTime\":{\"hour\":1997522468,\"minute\":655680628},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":1866473569,\"minute\":212177726},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":862594448,\"rampDownCapacityThresholdPct\":157234884,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":1142457061,\"rampDownNotificationMessage\":\"gevqznty\",\"offPeakStartTime\":{\"hour\":1534766868,\"minute\":1785806943},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},{\"name\":\"c\",\"daysOfWeek\":[\"Tuesday\",\"Wednesday\",\"Friday\",\"Friday\"],\"rampUpStartTime\":{\"hour\":2075884745,\"minute\":1295210131},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":229483686,\"rampUpCapacityThresholdPct\":1665159346,\"peakStartTime\":{\"hour\":856772857,\"minute\":403055260},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":170373532,\"minute\":1718564660},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1909902819,\"rampDownCapacityThresholdPct\":362966046,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":22083476,\"rampDownNotificationMessage\":\"bkh\",\"offPeakStartTime\":{\"hour\":2127806039,\"minute\":1192393079},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"}],\"hostPoolReferences\":[{\"hostPoolArmPath\":\"p\",\"scalingPlanEnabled\":false}]}") .toObject(ScalingPlanProperties.class); - Assertions.assertEquals("khixuigdtopbo", model.description()); - Assertions.assertEquals("og", model.friendlyName()); - Assertions.assertEquals("m", model.timeZone()); + Assertions.assertEquals("xc", model.description()); + Assertions.assertEquals("npc", model.friendlyName()); + Assertions.assertEquals("hocohslkev", model.timeZone()); Assertions.assertEquals(ScalingHostPoolType.POOLED, model.hostPoolType()); - Assertions.assertEquals("m", model.exclusionTag()); - Assertions.assertEquals("z", model.schedules().get(0).name()); - Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.TUESDAY, model.schedules().get(0).daysOfWeek().get(0)); - Assertions.assertEquals(1906806316, model.schedules().get(0).rampUpStartTime().hour()); - Assertions.assertEquals(1605476123, model.schedules().get(0).rampUpStartTime().minute()); + Assertions.assertEquals("zfbuhf", model.exclusionTag()); + Assertions.assertEquals("x", model.schedules().get(0).name()); + Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.SUNDAY, model.schedules().get(0).daysOfWeek().get(0)); + Assertions.assertEquals(378191098, model.schedules().get(0).rampUpStartTime().hour()); + Assertions.assertEquals(1914432251, model.schedules().get(0).rampUpStartTime().minute()); Assertions .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1330318957, model.schedules().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(1706248091, model.schedules().get(0).rampUpCapacityThresholdPct()); - Assertions.assertEquals(1659633182, model.schedules().get(0).peakStartTime().hour()); - Assertions.assertEquals(1980414786, model.schedules().get(0).peakStartTime().minute()); + SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, + model.schedules().get(0).rampUpLoadBalancingAlgorithm()); + Assertions.assertEquals(511745945, model.schedules().get(0).rampUpMinimumHostsPct()); + Assertions.assertEquals(72720177, model.schedules().get(0).rampUpCapacityThresholdPct()); + Assertions.assertEquals(1090911341, model.schedules().get(0).peakStartTime().hour()); + Assertions.assertEquals(516508763, model.schedules().get(0).peakStartTime().minute()); Assertions .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); - Assertions.assertEquals(496425950, model.schedules().get(0).rampDownStartTime().hour()); - Assertions.assertEquals(2113328566, model.schedules().get(0).rampDownStartTime().minute()); + SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); + Assertions.assertEquals(2099560460, model.schedules().get(0).rampDownStartTime().hour()); + Assertions.assertEquals(63743502, model.schedules().get(0).rampDownStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1915071310, model.schedules().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(628151950, model.schedules().get(0).rampDownCapacityThresholdPct()); + Assertions.assertEquals(852408036, model.schedules().get(0).rampDownMinimumHostsPct()); + Assertions.assertEquals(1533389693, model.schedules().get(0).rampDownCapacityThresholdPct()); Assertions.assertEquals(true, model.schedules().get(0).rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(1069562904, model.schedules().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("dqmidtt", model.schedules().get(0).rampDownNotificationMessage()); - Assertions.assertEquals(1570785735, model.schedules().get(0).offPeakStartTime().hour()); - Assertions.assertEquals(1160468590, model.schedules().get(0).offPeakStartTime().minute()); + Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); + Assertions.assertEquals(849896725, model.schedules().get(0).rampDownWaitTimeMinutes()); + Assertions.assertEquals("jx", model.schedules().get(0).rampDownNotificationMessage()); + Assertions.assertEquals(2030028307, model.schedules().get(0).offPeakStartTime().hour()); + Assertions.assertEquals(953955678, model.schedules().get(0).offPeakStartTime().minute()); Assertions .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, + SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("keyyi", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(true, model.hostPoolReferences().get(0).scalingPlanEnabled()); + Assertions.assertEquals("p", model.hostPoolReferences().get(0).hostPoolArmPath()); + Assertions.assertEquals(false, model.hostPoolReferences().get(0).scalingPlanEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScalingPlanProperties model = new ScalingPlanProperties() - .withDescription("khixuigdtopbo") - .withFriendlyName("og") - .withTimeZone("m") + .withDescription("xc") + .withFriendlyName("npc") + .withTimeZone("hocohslkev") .withHostPoolType(ScalingHostPoolType.POOLED) - .withExclusionTag("m") + .withExclusionTag("zfbuhf") .withSchedules( Arrays .asList( new ScalingSchedule() - .withName("z") + .withName("x") .withDaysOfWeek( Arrays .asList( - ScalingScheduleDaysOfWeekItem.TUESDAY, - ScalingScheduleDaysOfWeekItem.FRIDAY, - ScalingScheduleDaysOfWeekItem.THURSDAY)) - .withRampUpStartTime(new Time().withHour(1906806316).withMinute(1605476123)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(1330318957) - .withRampUpCapacityThresholdPct(1706248091) - .withPeakStartTime(new Time().withHour(1659633182).withMinute(1980414786)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownStartTime(new Time().withHour(496425950).withMinute(2113328566)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(1915071310) - .withRampDownCapacityThresholdPct(628151950) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(1069562904) - .withRampDownNotificationMessage("dqmidtt") - .withOffPeakStartTime(new Time().withHour(1570785735).withMinute(1160468590)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST), - new ScalingSchedule() - .withName("abhjybi") - .withDaysOfWeek(Arrays.asList(ScalingScheduleDaysOfWeekItem.SATURDAY)) - .withRampUpStartTime(new Time().withHour(384321349).withMinute(1256732319)) + ScalingScheduleDaysOfWeekItem.SUNDAY, + ScalingScheduleDaysOfWeekItem.SATURDAY, + ScalingScheduleDaysOfWeekItem.WEDNESDAY)) + .withRampUpStartTime(new Time().withHour(378191098).withMinute(1914432251)) .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(1382683860) - .withRampUpCapacityThresholdPct(465330089) - .withPeakStartTime(new Time().withHour(339779256).withMinute(1420716073)) + .withRampUpMinimumHostsPct(511745945) + .withRampUpCapacityThresholdPct(72720177) + .withPeakStartTime(new Time().withHour(1090911341).withMinute(516508763)) .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(104949992).withMinute(1785723021)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownMinimumHostsPct(616844240) - .withRampDownCapacityThresholdPct(1328534140) + .withRampDownStartTime(new Time().withHour(2099560460).withMinute(63743502)) + .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownMinimumHostsPct(852408036) + .withRampDownCapacityThresholdPct(1533389693) .withRampDownForceLogoffUsers(true) .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(1043685699) - .withRampDownNotificationMessage("hzgpphrcgyncocpe") - .withOffPeakStartTime(new Time().withHour(1965722470).withMinute(80244831)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST), + .withRampDownWaitTimeMinutes(849896725) + .withRampDownNotificationMessage("jx") + .withOffPeakStartTime(new Time().withHour(2030028307).withMinute(953955678)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), new ScalingSchedule() - .withName("ofsx") + .withName("ptkoenkoukn") .withDaysOfWeek( Arrays .asList( ScalingScheduleDaysOfWeekItem.MONDAY, - ScalingScheduleDaysOfWeekItem.WEDNESDAY)) - .withRampUpStartTime(new Time().withHour(11463195).withMinute(1397850949)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(1593493877) - .withRampUpCapacityThresholdPct(27534889) - .withPeakStartTime(new Time().withHour(591177451).withMinute(1896643633)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(699585009).withMinute(1951754582)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownMinimumHostsPct(211064208) - .withRampDownCapacityThresholdPct(1916526415) + ScalingScheduleDaysOfWeekItem.SATURDAY, + ScalingScheduleDaysOfWeekItem.THURSDAY, + ScalingScheduleDaysOfWeekItem.SATURDAY)) + .withRampUpStartTime(new Time().withHour(133898645).withMinute(45967354)) + .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampUpMinimumHostsPct(969530861) + .withRampUpCapacityThresholdPct(626726522) + .withPeakStartTime(new Time().withHour(1997522468).withMinute(655680628)) + .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampDownStartTime(new Time().withHour(1866473569).withMinute(212177726)) + .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownMinimumHostsPct(862594448) + .withRampDownCapacityThresholdPct(157234884) .withRampDownForceLogoffUsers(false) .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(1569035417) - .withRampDownNotificationMessage("ionle") - .withOffPeakStartTime(new Time().withHour(783809750).withMinute(1131419469)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), + .withRampDownWaitTimeMinutes(1142457061) + .withRampDownNotificationMessage("gevqznty") + .withOffPeakStartTime(new Time().withHour(1534766868).withMinute(1785806943)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST), new ScalingSchedule() - .withName("zxdpnqbqqw") + .withName("c") .withDaysOfWeek( Arrays .asList( + ScalingScheduleDaysOfWeekItem.TUESDAY, + ScalingScheduleDaysOfWeekItem.WEDNESDAY, ScalingScheduleDaysOfWeekItem.FRIDAY, - ScalingScheduleDaysOfWeekItem.MONDAY, - ScalingScheduleDaysOfWeekItem.MONDAY)) - .withRampUpStartTime(new Time().withHour(61111335).withMinute(89405990)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(1586389833) - .withRampUpCapacityThresholdPct(141642169) - .withPeakStartTime(new Time().withHour(1641702766).withMinute(2067310250)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownStartTime(new Time().withHour(1769886925).withMinute(409786419)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownMinimumHostsPct(86962705) - .withRampDownCapacityThresholdPct(611724458) - .withRampDownForceLogoffUsers(false) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(1004687873) - .withRampDownNotificationMessage("bonqvpkvlrxnjeas") - .withOffPeakStartTime(new Time().withHour(625674029).withMinute(1902616098)) + ScalingScheduleDaysOfWeekItem.FRIDAY)) + .withRampUpStartTime(new Time().withHour(2075884745).withMinute(1295210131)) + .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampUpMinimumHostsPct(229483686) + .withRampUpCapacityThresholdPct(1665159346) + .withPeakStartTime(new Time().withHour(856772857).withMinute(403055260)) + .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownStartTime(new Time().withHour(170373532).withMinute(1718564660)) + .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownMinimumHostsPct(1909902819) + .withRampDownCapacityThresholdPct(362966046) + .withRampDownForceLogoffUsers(true) + .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) + .withRampDownWaitTimeMinutes(22083476) + .withRampDownNotificationMessage("bkh") + .withOffPeakStartTime(new Time().withHour(2127806039).withMinute(1192393079)) .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST))) .withHostPoolReferences( Arrays - .asList( - new ScalingHostPoolReference().withHostPoolArmPath("keyyi").withScalingPlanEnabled(true), - new ScalingHostPoolReference() - .withHostPoolArmPath("dlwtgrhpdj") - .withScalingPlanEnabled(true))); + .asList(new ScalingHostPoolReference().withHostPoolArmPath("p").withScalingPlanEnabled(false))); model = BinaryData.fromObject(model).toObject(ScalingPlanProperties.class); - Assertions.assertEquals("khixuigdtopbo", model.description()); - Assertions.assertEquals("og", model.friendlyName()); - Assertions.assertEquals("m", model.timeZone()); + Assertions.assertEquals("xc", model.description()); + Assertions.assertEquals("npc", model.friendlyName()); + Assertions.assertEquals("hocohslkev", model.timeZone()); Assertions.assertEquals(ScalingHostPoolType.POOLED, model.hostPoolType()); - Assertions.assertEquals("m", model.exclusionTag()); - Assertions.assertEquals("z", model.schedules().get(0).name()); - Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.TUESDAY, model.schedules().get(0).daysOfWeek().get(0)); - Assertions.assertEquals(1906806316, model.schedules().get(0).rampUpStartTime().hour()); - Assertions.assertEquals(1605476123, model.schedules().get(0).rampUpStartTime().minute()); + Assertions.assertEquals("zfbuhf", model.exclusionTag()); + Assertions.assertEquals("x", model.schedules().get(0).name()); + Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.SUNDAY, model.schedules().get(0).daysOfWeek().get(0)); + Assertions.assertEquals(378191098, model.schedules().get(0).rampUpStartTime().hour()); + Assertions.assertEquals(1914432251, model.schedules().get(0).rampUpStartTime().minute()); Assertions .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1330318957, model.schedules().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(1706248091, model.schedules().get(0).rampUpCapacityThresholdPct()); - Assertions.assertEquals(1659633182, model.schedules().get(0).peakStartTime().hour()); - Assertions.assertEquals(1980414786, model.schedules().get(0).peakStartTime().minute()); + SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, + model.schedules().get(0).rampUpLoadBalancingAlgorithm()); + Assertions.assertEquals(511745945, model.schedules().get(0).rampUpMinimumHostsPct()); + Assertions.assertEquals(72720177, model.schedules().get(0).rampUpCapacityThresholdPct()); + Assertions.assertEquals(1090911341, model.schedules().get(0).peakStartTime().hour()); + Assertions.assertEquals(516508763, model.schedules().get(0).peakStartTime().minute()); Assertions .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); - Assertions.assertEquals(496425950, model.schedules().get(0).rampDownStartTime().hour()); - Assertions.assertEquals(2113328566, model.schedules().get(0).rampDownStartTime().minute()); + SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); + Assertions.assertEquals(2099560460, model.schedules().get(0).rampDownStartTime().hour()); + Assertions.assertEquals(63743502, model.schedules().get(0).rampDownStartTime().minute()); Assertions .assertEquals( SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1915071310, model.schedules().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(628151950, model.schedules().get(0).rampDownCapacityThresholdPct()); + Assertions.assertEquals(852408036, model.schedules().get(0).rampDownMinimumHostsPct()); + Assertions.assertEquals(1533389693, model.schedules().get(0).rampDownCapacityThresholdPct()); Assertions.assertEquals(true, model.schedules().get(0).rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(1069562904, model.schedules().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("dqmidtt", model.schedules().get(0).rampDownNotificationMessage()); - Assertions.assertEquals(1570785735, model.schedules().get(0).offPeakStartTime().hour()); - Assertions.assertEquals(1160468590, model.schedules().get(0).offPeakStartTime().minute()); + Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); + Assertions.assertEquals(849896725, model.schedules().get(0).rampDownWaitTimeMinutes()); + Assertions.assertEquals("jx", model.schedules().get(0).rampDownNotificationMessage()); + Assertions.assertEquals(2030028307, model.schedules().get(0).offPeakStartTime().hour()); + Assertions.assertEquals(953955678, model.schedules().get(0).offPeakStartTime().minute()); Assertions .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, + SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("keyyi", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(true, model.hostPoolReferences().get(0).scalingPlanEnabled()); + Assertions.assertEquals("p", model.hostPoolReferences().get(0).hostPoolArmPath()); + Assertions.assertEquals(false, model.hostPoolReferences().get(0).scalingPlanEnabled()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteByResourceGroupWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteByResourceGroupWithResponseMockTests.java index a2c103c9c792..b749591d05a6 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteByResourceGroupWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteByResourceGroupWithResponseMockTests.java @@ -58,6 +58,6 @@ public void testDeleteWithResponse() throws Exception { manager .scalingPlans() - .deleteByResourceGroupWithResponse("iuxxpshneekulfg", "lqubkwdlen", com.azure.core.util.Context.NONE); + .deleteByResourceGroupWithResponse("tcmwqkchc", "waxfewzjkj", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingScheduleTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingScheduleTests.java index ede83d9b0680..de1c5dd0a678 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingScheduleTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingScheduleTests.java @@ -19,77 +19,82 @@ public void testDeserialize() throws Exception { ScalingSchedule model = BinaryData .fromString( - "{\"name\":\"asxazjpqyegualhb\",\"daysOfWeek\":[\"Monday\",\"Sunday\"],\"rampUpStartTime\":{\"hour\":497531730,\"minute\":2029322855},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":303390013,\"rampUpCapacityThresholdPct\":943978504,\"peakStartTime\":{\"hour\":1894973970,\"minute\":678602064},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":271444945,\"minute\":719647330},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":264825105,\"rampDownCapacityThresholdPct\":1581858778,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":34788734,\"rampDownNotificationMessage\":\"cftadeh\",\"offPeakStartTime\":{\"hour\":1636345438,\"minute\":1194387790},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"}") + "{\"name\":\"lpbuxwgipwhonowk\",\"daysOfWeek\":[\"Saturday\",\"Wednesday\",\"Tuesday\",\"Saturday\"],\"rampUpStartTime\":{\"hour\":691407592,\"minute\":583460875},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":624724935,\"rampUpCapacityThresholdPct\":491108548,\"peakStartTime\":{\"hour\":895884461,\"minute\":1086025239},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":2061883120,\"minute\":998969185},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1117331465,\"rampDownCapacityThresholdPct\":591392190,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":130500015,\"rampDownNotificationMessage\":\"cqvyxlwhzlsico\",\"offPeakStartTime\":{\"hour\":774640076,\"minute\":1969001145},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"}") .toObject(ScalingSchedule.class); - Assertions.assertEquals("asxazjpqyegualhb", model.name()); - Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.MONDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(497531730, model.rampUpStartTime().hour()); - Assertions.assertEquals(2029322855, model.rampUpStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(303390013, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(943978504, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(1894973970, model.peakStartTime().hour()); - Assertions.assertEquals(678602064, model.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(271444945, model.rampDownStartTime().hour()); - Assertions.assertEquals(719647330, model.rampDownStartTime().minute()); + Assertions.assertEquals("lpbuxwgipwhonowk", model.name()); + Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.SATURDAY, model.daysOfWeek().get(0)); + Assertions.assertEquals(691407592, model.rampUpStartTime().hour()); + Assertions.assertEquals(583460875, model.rampUpStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.rampUpLoadBalancingAlgorithm()); + Assertions.assertEquals(624724935, model.rampUpMinimumHostsPct()); + Assertions.assertEquals(491108548, model.rampUpCapacityThresholdPct()); + Assertions.assertEquals(895884461, model.peakStartTime().hour()); + Assertions.assertEquals(1086025239, model.peakStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.peakLoadBalancingAlgorithm()); + Assertions.assertEquals(2061883120, model.rampDownStartTime().hour()); + Assertions.assertEquals(998969185, model.rampDownStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(264825105, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(1581858778, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(false, model.rampDownForceLogoffUsers()); + Assertions.assertEquals(1117331465, model.rampDownMinimumHostsPct()); + Assertions.assertEquals(591392190, model.rampDownCapacityThresholdPct()); + Assertions.assertEquals(true, model.rampDownForceLogoffUsers()); Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(34788734, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("cftadeh", model.rampDownNotificationMessage()); - Assertions.assertEquals(1636345438, model.offPeakStartTime().hour()); - Assertions.assertEquals(1194387790, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.offPeakLoadBalancingAlgorithm()); + Assertions.assertEquals(130500015, model.rampDownWaitTimeMinutes()); + Assertions.assertEquals("cqvyxlwhzlsico", model.rampDownNotificationMessage()); + Assertions.assertEquals(774640076, model.offPeakStartTime().hour()); + Assertions.assertEquals(1969001145, model.offPeakStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.offPeakLoadBalancingAlgorithm()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScalingSchedule model = new ScalingSchedule() - .withName("asxazjpqyegualhb") + .withName("lpbuxwgipwhonowk") .withDaysOfWeek( - Arrays.asList(ScalingScheduleDaysOfWeekItem.MONDAY, ScalingScheduleDaysOfWeekItem.SUNDAY)) - .withRampUpStartTime(new Time().withHour(497531730).withMinute(2029322855)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(303390013) - .withRampUpCapacityThresholdPct(943978504) - .withPeakStartTime(new Time().withHour(1894973970).withMinute(678602064)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(271444945).withMinute(719647330)) + Arrays + .asList( + ScalingScheduleDaysOfWeekItem.SATURDAY, + ScalingScheduleDaysOfWeekItem.WEDNESDAY, + ScalingScheduleDaysOfWeekItem.TUESDAY, + ScalingScheduleDaysOfWeekItem.SATURDAY)) + .withRampUpStartTime(new Time().withHour(691407592).withMinute(583460875)) + .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampUpMinimumHostsPct(624724935) + .withRampUpCapacityThresholdPct(491108548) + .withPeakStartTime(new Time().withHour(895884461).withMinute(1086025239)) + .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampDownStartTime(new Time().withHour(2061883120).withMinute(998969185)) .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(264825105) - .withRampDownCapacityThresholdPct(1581858778) - .withRampDownForceLogoffUsers(false) + .withRampDownMinimumHostsPct(1117331465) + .withRampDownCapacityThresholdPct(591392190) + .withRampDownForceLogoffUsers(true) .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(34788734) - .withRampDownNotificationMessage("cftadeh") - .withOffPeakStartTime(new Time().withHour(1636345438).withMinute(1194387790)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST); + .withRampDownWaitTimeMinutes(130500015) + .withRampDownNotificationMessage("cqvyxlwhzlsico") + .withOffPeakStartTime(new Time().withHour(774640076).withMinute(1969001145)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST); model = BinaryData.fromObject(model).toObject(ScalingSchedule.class); - Assertions.assertEquals("asxazjpqyegualhb", model.name()); - Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.MONDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(497531730, model.rampUpStartTime().hour()); - Assertions.assertEquals(2029322855, model.rampUpStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(303390013, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(943978504, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(1894973970, model.peakStartTime().hour()); - Assertions.assertEquals(678602064, model.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(271444945, model.rampDownStartTime().hour()); - Assertions.assertEquals(719647330, model.rampDownStartTime().minute()); + Assertions.assertEquals("lpbuxwgipwhonowk", model.name()); + Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.SATURDAY, model.daysOfWeek().get(0)); + Assertions.assertEquals(691407592, model.rampUpStartTime().hour()); + Assertions.assertEquals(583460875, model.rampUpStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.rampUpLoadBalancingAlgorithm()); + Assertions.assertEquals(624724935, model.rampUpMinimumHostsPct()); + Assertions.assertEquals(491108548, model.rampUpCapacityThresholdPct()); + Assertions.assertEquals(895884461, model.peakStartTime().hour()); + Assertions.assertEquals(1086025239, model.peakStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.peakLoadBalancingAlgorithm()); + Assertions.assertEquals(2061883120, model.rampDownStartTime().hour()); + Assertions.assertEquals(998969185, model.rampDownStartTime().minute()); Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(264825105, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(1581858778, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(false, model.rampDownForceLogoffUsers()); + Assertions.assertEquals(1117331465, model.rampDownMinimumHostsPct()); + Assertions.assertEquals(591392190, model.rampDownCapacityThresholdPct()); + Assertions.assertEquals(true, model.rampDownForceLogoffUsers()); Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(34788734, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("cftadeh", model.rampDownNotificationMessage()); - Assertions.assertEquals(1636345438, model.offPeakStartTime().hour()); - Assertions.assertEquals(1194387790, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.offPeakLoadBalancingAlgorithm()); + Assertions.assertEquals(130500015, model.rampDownWaitTimeMinutes()); + Assertions.assertEquals("cqvyxlwhzlsico", model.rampDownNotificationMessage()); + Assertions.assertEquals(774640076, model.offPeakStartTime().hour()); + Assertions.assertEquals(1969001145, model.offPeakStartTime().minute()); + Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.offPeakLoadBalancingAlgorithm()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SendMessageTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SendMessageTests.java index 7be431d70f22..4a566097fd95 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SendMessageTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SendMessageTests.java @@ -13,17 +13,17 @@ public final class SendMessageTests { public void testDeserialize() throws Exception { SendMessage model = BinaryData - .fromString("{\"messageTitle\":\"iakp\",\"messageBody\":\"qqmtedltmmji\"}") + .fromString("{\"messageTitle\":\"srdvetn\",\"messageBody\":\"dtutnwldu\"}") .toObject(SendMessage.class); - Assertions.assertEquals("iakp", model.messageTitle()); - Assertions.assertEquals("qqmtedltmmji", model.messageBody()); + Assertions.assertEquals("srdvetn", model.messageTitle()); + Assertions.assertEquals("dtutnwldu", model.messageBody()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SendMessage model = new SendMessage().withMessageTitle("iakp").withMessageBody("qqmtedltmmji"); + SendMessage model = new SendMessage().withMessageTitle("srdvetn").withMessageBody("dtutnwldu"); model = BinaryData.fromObject(model).toObject(SendMessage.class); - Assertions.assertEquals("iakp", model.messageTitle()); - Assertions.assertEquals("qqmtedltmmji", model.messageBody()); + Assertions.assertEquals("srdvetn", model.messageTitle()); + Assertions.assertEquals("dtutnwldu", model.messageBody()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ServiceSpecificationTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ServiceSpecificationTests.java index bb43c9514764..dd24493b8611 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ServiceSpecificationTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ServiceSpecificationTests.java @@ -16,11 +16,11 @@ public void testDeserialize() throws Exception { ServiceSpecification model = BinaryData .fromString( - "{\"logSpecifications\":[{\"name\":\"okjye\",\"displayName\":\"kvnipjoxz\",\"blobDuration\":\"chgejspodm\"},{\"name\":\"lzydehojwyahux\",\"displayName\":\"pmqnja\",\"blobDuration\":\"ixjsprozvcputeg\"}]}") + "{\"logSpecifications\":[{\"name\":\"qniwbybrkxvdumj\",\"displayName\":\"tfwvukxgaudc\",\"blobDuration\":\"nhsjcnyej\"}]}") .toObject(ServiceSpecification.class); - Assertions.assertEquals("okjye", model.logSpecifications().get(0).name()); - Assertions.assertEquals("kvnipjoxz", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("chgejspodm", model.logSpecifications().get(0).blobDuration()); + Assertions.assertEquals("qniwbybrkxvdumj", model.logSpecifications().get(0).name()); + Assertions.assertEquals("tfwvukxgaudc", model.logSpecifications().get(0).displayName()); + Assertions.assertEquals("nhsjcnyej", model.logSpecifications().get(0).blobDuration()); } @org.junit.jupiter.api.Test @@ -31,16 +31,12 @@ public void testSerialize() throws Exception { Arrays .asList( new LogSpecification() - .withName("okjye") - .withDisplayName("kvnipjoxz") - .withBlobDuration("chgejspodm"), - new LogSpecification() - .withName("lzydehojwyahux") - .withDisplayName("pmqnja") - .withBlobDuration("ixjsprozvcputeg"))); + .withName("qniwbybrkxvdumj") + .withDisplayName("tfwvukxgaudc") + .withBlobDuration("nhsjcnyej"))); model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("okjye", model.logSpecifications().get(0).name()); - Assertions.assertEquals("kvnipjoxz", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("chgejspodm", model.logSpecifications().get(0).blobDuration()); + Assertions.assertEquals("qniwbybrkxvdumj", model.logSpecifications().get(0).name()); + Assertions.assertEquals("tfwvukxgaudc", model.logSpecifications().get(0).displayName()); + Assertions.assertEquals("nhsjcnyej", model.logSpecifications().get(0).blobDuration()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostInnerTests.java deleted file mode 100644 index 0d8c45ddd486..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostInnerTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.SessionHostInner; -import com.azure.resourcemanager.desktopvirtualization.models.Status; -import com.azure.resourcemanager.desktopvirtualization.models.UpdateState; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class SessionHostInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SessionHostInner model = - BinaryData - .fromString( - "{\"properties\":{\"objectId\":\"ltdtbnnhad\",\"lastHeartBeat\":\"2021-04-24T13:40:54Z\",\"sessions\":948301726,\"agentVersion\":\"cikhnv\",\"allowNewSession\":false,\"virtualMachineId\":\"gxqquezik\",\"resourceId\":\"ggxkallatmelwuip\",\"assignedUser\":\"cjzkzivgvvcna\",\"friendlyName\":\"hyrnxxmu\",\"status\":\"FSLogixNotHealthy\",\"statusTimestamp\":\"2021-01-14T05:54:01Z\",\"osVersion\":\"dvstkw\",\"sxSStackVersion\":\"tchealmf\",\"updateState\":\"Pending\",\"lastUpdateTime\":\"2021-06-02T22:58:14Z\",\"updateErrorMessage\":\"gdv\",\"sessionHostHealthCheckResults\":[{\"healthCheckName\":\"WebRTCRedirectorCheck\",\"healthCheckResult\":\"HealthCheckFailed\"},{\"healthCheckName\":\"MetaDataServiceCheck\",\"healthCheckResult\":\"HealthCheckSucceeded\"},{\"healthCheckName\":\"AppAttachHealthCheck\",\"healthCheckResult\":\"HealthCheckFailed\"},{\"healthCheckName\":\"WebRTCRedirectorCheck\",\"healthCheckResult\":\"HealthCheckSucceeded\"}]},\"id\":\"gvr\",\"name\":\"mnpkukghimdblxg\",\"type\":\"imfnjhfjx\"}") - .toObject(SessionHostInner.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T13:40:54Z"), model.lastHeartBeat()); - Assertions.assertEquals(948301726, model.sessions()); - Assertions.assertEquals("cikhnv", model.agentVersion()); - Assertions.assertEquals(false, model.allowNewSession()); - Assertions.assertEquals("cjzkzivgvvcna", model.assignedUser()); - Assertions.assertEquals("hyrnxxmu", model.friendlyName()); - Assertions.assertEquals(Status.FSLOGIX_NOT_HEALTHY, model.status()); - Assertions.assertEquals("dvstkw", model.osVersion()); - Assertions.assertEquals("tchealmf", model.sxSStackVersion()); - Assertions.assertEquals(UpdateState.PENDING, model.updateState()); - Assertions.assertEquals("gdv", model.updateErrorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionHostInner model = - new SessionHostInner() - .withLastHeartBeat(OffsetDateTime.parse("2021-04-24T13:40:54Z")) - .withSessions(948301726) - .withAgentVersion("cikhnv") - .withAllowNewSession(false) - .withAssignedUser("cjzkzivgvvcna") - .withFriendlyName("hyrnxxmu") - .withStatus(Status.FSLOGIX_NOT_HEALTHY) - .withOsVersion("dvstkw") - .withSxSStackVersion("tchealmf") - .withUpdateState(UpdateState.PENDING) - .withUpdateErrorMessage("gdv"); - model = BinaryData.fromObject(model).toObject(SessionHostInner.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T13:40:54Z"), model.lastHeartBeat()); - Assertions.assertEquals(948301726, model.sessions()); - Assertions.assertEquals("cikhnv", model.agentVersion()); - Assertions.assertEquals(false, model.allowNewSession()); - Assertions.assertEquals("cjzkzivgvvcna", model.assignedUser()); - Assertions.assertEquals("hyrnxxmu", model.friendlyName()); - Assertions.assertEquals(Status.FSLOGIX_NOT_HEALTHY, model.status()); - Assertions.assertEquals("dvstkw", model.osVersion()); - Assertions.assertEquals("tchealmf", model.sxSStackVersion()); - Assertions.assertEquals(UpdateState.PENDING, model.updateState()); - Assertions.assertEquals("gdv", model.updateErrorMessage()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostListTests.java index c083a9d541ae..a077bd4d6d2b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostListTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostListTests.java @@ -19,19 +19,19 @@ public void testDeserialize() throws Exception { SessionHostList model = BinaryData .fromString( - "{\"value\":[{\"properties\":{\"objectId\":\"ugjhky\",\"lastHeartBeat\":\"2020-12-25T16:19:20Z\",\"sessions\":642347272,\"agentVersion\":\"gssofwq\",\"allowNewSession\":false,\"virtualMachineId\":\"lkrm\",\"resourceId\":\"i\",\"assignedUser\":\"xacqqudfnbyx\",\"friendlyName\":\"aabjyvayffimrz\",\"status\":\"SxSStackListenerNotReady\",\"statusTimestamp\":\"2021-04-17T19:16:23Z\",\"osVersion\":\"gsexne\",\"sxSStackVersion\":\"dnw\",\"updateState\":\"Failed\",\"lastUpdateTime\":\"2021-01-03T05:03:28Z\",\"updateErrorMessage\":\"syyceuzsoibjud\",\"sessionHostHealthCheckResults\":[]},\"id\":\"rx\",\"name\":\"rthzvaytdwkqbrqu\",\"type\":\"paxh\"}],\"nextLink\":\"iilivpdtiirqtd\"}") + "{\"value\":[{\"properties\":{\"objectId\":\"ygvjayvblmh\",\"lastHeartBeat\":\"2021-07-26T11:14:50Z\",\"sessions\":2100624724,\"agentVersion\":\"xvvy\",\"allowNewSession\":false,\"virtualMachineId\":\"pbyrqufegxu\",\"resourceId\":\"zfbn\",\"assignedUser\":\"mctlpdngitv\",\"friendlyName\":\"mhrixkwmyijejve\",\"status\":\"NeedsAssistance\",\"statusTimestamp\":\"2021-09-18T06:49:11Z\",\"osVersion\":\"aixexccbdreaxh\",\"sxSStackVersion\":\"xdrrvqahqkghtp\",\"updateState\":\"Initial\",\"lastUpdateTime\":\"2021-03-19T04:26:57Z\",\"updateErrorMessage\":\"jsvfycxzbfvoowv\",\"sessionHostHealthCheckResults\":[{\"healthCheckName\":\"WebRTCRedirectorCheck\",\"healthCheckResult\":\"Unknown\",\"additionalFailureDetails\":{}}]},\"id\":\"pyostronzmyhgfi\",\"name\":\"nsxkmcwaekrrjr\",\"type\":\"afxtsgum\"},{\"properties\":{\"objectId\":\"ikkx\",\"lastHeartBeat\":\"2021-05-16T06:07:50Z\",\"sessions\":1513768261,\"agentVersion\":\"qpvuzlmvfelf\",\"allowNewSession\":true,\"virtualMachineId\":\"lcrpw\",\"resourceId\":\"eznoig\",\"assignedUser\":\"njwmwkpnbsazejj\",\"friendlyName\":\"kagfhsxtt\",\"status\":\"Available\",\"statusTimestamp\":\"2021-04-24T19:56:55Z\",\"osVersion\":\"faazpxdtnkdmkqjj\",\"sxSStackVersion\":\"uenvrkp\",\"updateState\":\"Failed\",\"lastUpdateTime\":\"2021-06-02T18:39:14Z\",\"updateErrorMessage\":\"rebqaaysjk\",\"sessionHostHealthCheckResults\":[{\"healthCheckName\":\"SxSStackListenerCheck\",\"healthCheckResult\":\"HealthCheckSucceeded\",\"additionalFailureDetails\":{}},{\"healthCheckName\":\"UrlsAccessibleCheck\",\"healthCheckResult\":\"Unknown\",\"additionalFailureDetails\":{}}]},\"id\":\"ffiakp\",\"name\":\"pqqmted\",\"type\":\"tmmjihyeozph\"},{\"properties\":{\"objectId\":\"y\",\"lastHeartBeat\":\"2021-05-03T13:45:25Z\",\"sessions\":1385853585,\"agentVersion\":\"p\",\"allowNewSession\":false,\"virtualMachineId\":\"mdscwxqupev\",\"resourceId\":\"f\",\"assignedUser\":\"otxhojujby\",\"friendlyName\":\"lmcuvhixb\",\"status\":\"NeedsAssistance\",\"statusTimestamp\":\"2021-03-04T07:09:13Z\",\"osVersion\":\"yl\",\"sxSStackVersion\":\"ool\",\"updateState\":\"Started\",\"lastUpdateTime\":\"2021-01-29T16:46:41Z\",\"updateErrorMessage\":\"w\",\"sessionHostHealthCheckResults\":[{\"healthCheckName\":\"MetaDataServiceCheck\",\"healthCheckResult\":\"HealthCheckFailed\",\"additionalFailureDetails\":{}},{\"healthCheckName\":\"DomainTrustCheck\",\"healthCheckResult\":\"Unknown\",\"additionalFailureDetails\":{}},{\"healthCheckName\":\"SupportedEncryptionCheck\",\"healthCheckResult\":\"Unknown\",\"additionalFailureDetails\":{}},{\"healthCheckName\":\"MetaDataServiceCheck\",\"healthCheckResult\":\"HealthCheckFailed\",\"additionalFailureDetails\":{}}]},\"id\":\"wiithtywub\",\"name\":\"cbihwqk\",\"type\":\"fdntwjchrdgoih\"},{\"properties\":{\"objectId\":\"ctondz\",\"lastHeartBeat\":\"2021-05-20T02:25:29Z\",\"sessions\":382280149,\"agentVersion\":\"dlwggytsbwtovv\",\"allowNewSession\":true,\"virtualMachineId\":\"inqfiufxqknpirgn\",\"resourceId\":\"ttwqmsni\",\"assignedUser\":\"cdm\",\"friendlyName\":\"r\",\"status\":\"Disconnected\",\"statusTimestamp\":\"2021-07-05T10:57:07Z\",\"osVersion\":\"nkrxfrddhcr\",\"sxSStackVersion\":\"izzronasxiftozqy\",\"updateState\":\"Failed\",\"lastUpdateTime\":\"2021-07-28T03:20:11Z\",\"updateErrorMessage\":\"sgogczhonnxk\",\"sessionHostHealthCheckResults\":[{\"healthCheckName\":\"DomainReachable\",\"healthCheckResult\":\"SessionHostShutdown\",\"additionalFailureDetails\":{}},{\"healthCheckName\":\"WebRTCRedirectorCheck\",\"healthCheckResult\":\"HealthCheckSucceeded\",\"additionalFailureDetails\":{}},{\"healthCheckName\":\"WebRTCRedirectorCheck\",\"healthCheckResult\":\"SessionHostShutdown\",\"additionalFailureDetails\":{}}]},\"id\":\"gh\",\"name\":\"jbdhqxvc\",\"type\":\"gf\"}],\"nextLink\":\"dsofbshrns\"}") .toObject(SessionHostList.class); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-25T16:19:20Z"), model.value().get(0).lastHeartBeat()); - Assertions.assertEquals(642347272, model.value().get(0).sessions()); - Assertions.assertEquals("gssofwq", model.value().get(0).agentVersion()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T11:14:50Z"), model.value().get(0).lastHeartBeat()); + Assertions.assertEquals(2100624724, model.value().get(0).sessions()); + Assertions.assertEquals("xvvy", model.value().get(0).agentVersion()); Assertions.assertEquals(false, model.value().get(0).allowNewSession()); - Assertions.assertEquals("xacqqudfnbyx", model.value().get(0).assignedUser()); - Assertions.assertEquals("aabjyvayffimrz", model.value().get(0).friendlyName()); - Assertions.assertEquals(Status.SX_SSTACK_LISTENER_NOT_READY, model.value().get(0).status()); - Assertions.assertEquals("gsexne", model.value().get(0).osVersion()); - Assertions.assertEquals("dnw", model.value().get(0).sxSStackVersion()); - Assertions.assertEquals(UpdateState.FAILED, model.value().get(0).updateState()); - Assertions.assertEquals("syyceuzsoibjud", model.value().get(0).updateErrorMessage()); + Assertions.assertEquals("mctlpdngitv", model.value().get(0).assignedUser()); + Assertions.assertEquals("mhrixkwmyijejve", model.value().get(0).friendlyName()); + Assertions.assertEquals(Status.NEEDS_ASSISTANCE, model.value().get(0).status()); + Assertions.assertEquals("aixexccbdreaxh", model.value().get(0).osVersion()); + Assertions.assertEquals("xdrrvqahqkghtp", model.value().get(0).sxSStackVersion()); + Assertions.assertEquals(UpdateState.INITIAL, model.value().get(0).updateState()); + Assertions.assertEquals("jsvfycxzbfvoowv", model.value().get(0).updateErrorMessage()); } @org.junit.jupiter.api.Test @@ -42,28 +42,64 @@ public void testSerialize() throws Exception { Arrays .asList( new SessionHostInner() - .withLastHeartBeat(OffsetDateTime.parse("2020-12-25T16:19:20Z")) - .withSessions(642347272) - .withAgentVersion("gssofwq") + .withLastHeartBeat(OffsetDateTime.parse("2021-07-26T11:14:50Z")) + .withSessions(2100624724) + .withAgentVersion("xvvy") .withAllowNewSession(false) - .withAssignedUser("xacqqudfnbyx") - .withFriendlyName("aabjyvayffimrz") - .withStatus(Status.SX_SSTACK_LISTENER_NOT_READY) - .withOsVersion("gsexne") - .withSxSStackVersion("dnw") + .withAssignedUser("mctlpdngitv") + .withFriendlyName("mhrixkwmyijejve") + .withStatus(Status.NEEDS_ASSISTANCE) + .withOsVersion("aixexccbdreaxh") + .withSxSStackVersion("xdrrvqahqkghtp") + .withUpdateState(UpdateState.INITIAL) + .withUpdateErrorMessage("jsvfycxzbfvoowv"), + new SessionHostInner() + .withLastHeartBeat(OffsetDateTime.parse("2021-05-16T06:07:50Z")) + .withSessions(1513768261) + .withAgentVersion("qpvuzlmvfelf") + .withAllowNewSession(true) + .withAssignedUser("njwmwkpnbsazejj") + .withFriendlyName("kagfhsxtt") + .withStatus(Status.AVAILABLE) + .withOsVersion("faazpxdtnkdmkqjj") + .withSxSStackVersion("uenvrkp") + .withUpdateState(UpdateState.FAILED) + .withUpdateErrorMessage("rebqaaysjk"), + new SessionHostInner() + .withLastHeartBeat(OffsetDateTime.parse("2021-05-03T13:45:25Z")) + .withSessions(1385853585) + .withAgentVersion("p") + .withAllowNewSession(false) + .withAssignedUser("otxhojujby") + .withFriendlyName("lmcuvhixb") + .withStatus(Status.NEEDS_ASSISTANCE) + .withOsVersion("yl") + .withSxSStackVersion("ool") + .withUpdateState(UpdateState.STARTED) + .withUpdateErrorMessage("w"), + new SessionHostInner() + .withLastHeartBeat(OffsetDateTime.parse("2021-05-20T02:25:29Z")) + .withSessions(382280149) + .withAgentVersion("dlwggytsbwtovv") + .withAllowNewSession(true) + .withAssignedUser("cdm") + .withFriendlyName("r") + .withStatus(Status.DISCONNECTED) + .withOsVersion("nkrxfrddhcr") + .withSxSStackVersion("izzronasxiftozqy") .withUpdateState(UpdateState.FAILED) - .withUpdateErrorMessage("syyceuzsoibjud"))); + .withUpdateErrorMessage("sgogczhonnxk"))); model = BinaryData.fromObject(model).toObject(SessionHostList.class); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-25T16:19:20Z"), model.value().get(0).lastHeartBeat()); - Assertions.assertEquals(642347272, model.value().get(0).sessions()); - Assertions.assertEquals("gssofwq", model.value().get(0).agentVersion()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T11:14:50Z"), model.value().get(0).lastHeartBeat()); + Assertions.assertEquals(2100624724, model.value().get(0).sessions()); + Assertions.assertEquals("xvvy", model.value().get(0).agentVersion()); Assertions.assertEquals(false, model.value().get(0).allowNewSession()); - Assertions.assertEquals("xacqqudfnbyx", model.value().get(0).assignedUser()); - Assertions.assertEquals("aabjyvayffimrz", model.value().get(0).friendlyName()); - Assertions.assertEquals(Status.SX_SSTACK_LISTENER_NOT_READY, model.value().get(0).status()); - Assertions.assertEquals("gsexne", model.value().get(0).osVersion()); - Assertions.assertEquals("dnw", model.value().get(0).sxSStackVersion()); - Assertions.assertEquals(UpdateState.FAILED, model.value().get(0).updateState()); - Assertions.assertEquals("syyceuzsoibjud", model.value().get(0).updateErrorMessage()); + Assertions.assertEquals("mctlpdngitv", model.value().get(0).assignedUser()); + Assertions.assertEquals("mhrixkwmyijejve", model.value().get(0).friendlyName()); + Assertions.assertEquals(Status.NEEDS_ASSISTANCE, model.value().get(0).status()); + Assertions.assertEquals("aixexccbdreaxh", model.value().get(0).osVersion()); + Assertions.assertEquals("xdrrvqahqkghtp", model.value().get(0).sxSStackVersion()); + Assertions.assertEquals(UpdateState.INITIAL, model.value().get(0).updateState()); + Assertions.assertEquals("jsvfycxzbfvoowv", model.value().get(0).updateErrorMessage()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchPropertiesTests.java index 9e81603899a2..2b1354f095a8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchPropertiesTests.java @@ -13,11 +13,11 @@ public final class SessionHostPatchPropertiesTests { public void testDeserialize() throws Exception { SessionHostPatchProperties model = BinaryData - .fromString("{\"allowNewSession\":false,\"assignedUser\":\"duhpk\",\"friendlyName\":\"gymare\"}") + .fromString("{\"allowNewSession\":false,\"assignedUser\":\"vrwxkv\",\"friendlyName\":\"k\"}") .toObject(SessionHostPatchProperties.class); Assertions.assertEquals(false, model.allowNewSession()); - Assertions.assertEquals("duhpk", model.assignedUser()); - Assertions.assertEquals("gymare", model.friendlyName()); + Assertions.assertEquals("vrwxkv", model.assignedUser()); + Assertions.assertEquals("k", model.friendlyName()); } @org.junit.jupiter.api.Test @@ -25,11 +25,11 @@ public void testSerialize() throws Exception { SessionHostPatchProperties model = new SessionHostPatchProperties() .withAllowNewSession(false) - .withAssignedUser("duhpk") - .withFriendlyName("gymare"); + .withAssignedUser("vrwxkv") + .withFriendlyName("k"); model = BinaryData.fromObject(model).toObject(SessionHostPatchProperties.class); Assertions.assertEquals(false, model.allowNewSession()); - Assertions.assertEquals("duhpk", model.assignedUser()); - Assertions.assertEquals("gymare", model.friendlyName()); + Assertions.assertEquals("vrwxkv", model.assignedUser()); + Assertions.assertEquals("k", model.friendlyName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchTests.java index 8f9883da8b6a..2e42175df295 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchTests.java @@ -14,20 +14,20 @@ public void testDeserialize() throws Exception { SessionHostPatch model = BinaryData .fromString( - "{\"properties\":{\"allowNewSession\":true,\"assignedUser\":\"lr\",\"friendlyName\":\"yjmoadsu\"},\"id\":\"arm\",\"name\":\"wdmjsjqbjhhyx\",\"type\":\"rw\"}") + "{\"properties\":{\"allowNewSession\":false,\"assignedUser\":\"zywkb\",\"friendlyName\":\"ryuzh\"},\"id\":\"hkjoqr\",\"name\":\"qqaatjinrvgou\",\"type\":\"mfiibfggj\"}") .toObject(SessionHostPatch.class); - Assertions.assertEquals(true, model.allowNewSession()); - Assertions.assertEquals("lr", model.assignedUser()); - Assertions.assertEquals("yjmoadsu", model.friendlyName()); + Assertions.assertEquals(false, model.allowNewSession()); + Assertions.assertEquals("zywkb", model.assignedUser()); + Assertions.assertEquals("ryuzh", model.friendlyName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SessionHostPatch model = - new SessionHostPatch().withAllowNewSession(true).withAssignedUser("lr").withFriendlyName("yjmoadsu"); + new SessionHostPatch().withAllowNewSession(false).withAssignedUser("zywkb").withFriendlyName("ryuzh"); model = BinaryData.fromObject(model).toObject(SessionHostPatch.class); - Assertions.assertEquals(true, model.allowNewSession()); - Assertions.assertEquals("lr", model.assignedUser()); - Assertions.assertEquals("yjmoadsu", model.friendlyName()); + Assertions.assertEquals(false, model.allowNewSession()); + Assertions.assertEquals("zywkb", model.assignedUser()); + Assertions.assertEquals("ryuzh", model.friendlyName()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteWithResponseMockTests.java index 3905ab353fe8..a6e30281ee01 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteWithResponseMockTests.java @@ -58,6 +58,6 @@ public void testDeleteWithResponse() throws Exception { manager .sessionHosts() - .deleteWithResponse("guyaip", "dsdaultxijjumf", "waz", false, com.azure.core.util.Context.NONE); + .deleteWithResponse("rrscubiwsdrnp", "qwodiffjx", "jrmmuabwib", false, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SkuTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SkuTests.java index be2533cf6d7d..eace254e9da0 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SkuTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SkuTests.java @@ -15,29 +15,29 @@ public void testDeserialize() throws Exception { Sku model = BinaryData .fromString( - "{\"name\":\"wyqkgfgibm\",\"tier\":\"Basic\",\"size\":\"keqsrxybzqqedq\",\"family\":\"bciqfouflm\",\"capacity\":1828393347}") + "{\"name\":\"a\",\"tier\":\"Standard\",\"size\":\"izuckyfihrfidfvz\",\"family\":\"zuhtymwisdkfthwx\",\"capacity\":61317803}") .toObject(Sku.class); - Assertions.assertEquals("wyqkgfgibm", model.name()); - Assertions.assertEquals(SkuTier.BASIC, model.tier()); - Assertions.assertEquals("keqsrxybzqqedq", model.size()); - Assertions.assertEquals("bciqfouflm", model.family()); - Assertions.assertEquals(1828393347, model.capacity()); + Assertions.assertEquals("a", model.name()); + Assertions.assertEquals(SkuTier.STANDARD, model.tier()); + Assertions.assertEquals("izuckyfihrfidfvz", model.size()); + Assertions.assertEquals("zuhtymwisdkfthwx", model.family()); + Assertions.assertEquals(61317803, model.capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { Sku model = new Sku() - .withName("wyqkgfgibm") - .withTier(SkuTier.BASIC) - .withSize("keqsrxybzqqedq") - .withFamily("bciqfouflm") - .withCapacity(1828393347); + .withName("a") + .withTier(SkuTier.STANDARD) + .withSize("izuckyfihrfidfvz") + .withFamily("zuhtymwisdkfthwx") + .withCapacity(61317803); model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("wyqkgfgibm", model.name()); - Assertions.assertEquals(SkuTier.BASIC, model.tier()); - Assertions.assertEquals("keqsrxybzqqedq", model.size()); - Assertions.assertEquals("bciqfouflm", model.family()); - Assertions.assertEquals(1828393347, model.capacity()); + Assertions.assertEquals("a", model.name()); + Assertions.assertEquals(SkuTier.STANDARD, model.tier()); + Assertions.assertEquals("izuckyfihrfidfvz", model.size()); + Assertions.assertEquals("zuhtymwisdkfthwx", model.family()); + Assertions.assertEquals(61317803, model.capacity()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemInnerTests.java index 952a7cf23f86..0e4f9cd3a0f2 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemInnerTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemInnerTests.java @@ -14,29 +14,29 @@ public void testDeserialize() throws Exception { StartMenuItemInner model = BinaryData .fromString( - "{\"properties\":{\"appAlias\":\"us\",\"filePath\":\"slhs\",\"commandLineArguments\":\"deemao\",\"iconPath\":\"xagkvtmelmqkrh\",\"iconIndex\":1107885702},\"id\":\"ljuahaquhcdh\",\"name\":\"duala\",\"type\":\"xqpvfadmw\"}") + "{\"properties\":{\"appAlias\":\"jrjxgciqibrhosx\",\"filePath\":\"qrhzoymibmrqyib\",\"commandLineArguments\":\"wfluszdt\",\"iconPath\":\"rkwofyyvoqa\",\"iconIndex\":848769798},\"id\":\"expbtg\",\"name\":\"wbwo\",\"type\":\"nwashrtd\"}") .toObject(StartMenuItemInner.class); - Assertions.assertEquals("us", model.appAlias()); - Assertions.assertEquals("slhs", model.filePath()); - Assertions.assertEquals("deemao", model.commandLineArguments()); - Assertions.assertEquals("xagkvtmelmqkrh", model.iconPath()); - Assertions.assertEquals(1107885702, model.iconIndex()); + Assertions.assertEquals("jrjxgciqibrhosx", model.appAlias()); + Assertions.assertEquals("qrhzoymibmrqyib", model.filePath()); + Assertions.assertEquals("wfluszdt", model.commandLineArguments()); + Assertions.assertEquals("rkwofyyvoqa", model.iconPath()); + Assertions.assertEquals(848769798, model.iconIndex()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StartMenuItemInner model = new StartMenuItemInner() - .withAppAlias("us") - .withFilePath("slhs") - .withCommandLineArguments("deemao") - .withIconPath("xagkvtmelmqkrh") - .withIconIndex(1107885702); + .withAppAlias("jrjxgciqibrhosx") + .withFilePath("qrhzoymibmrqyib") + .withCommandLineArguments("wfluszdt") + .withIconPath("rkwofyyvoqa") + .withIconIndex(848769798); model = BinaryData.fromObject(model).toObject(StartMenuItemInner.class); - Assertions.assertEquals("us", model.appAlias()); - Assertions.assertEquals("slhs", model.filePath()); - Assertions.assertEquals("deemao", model.commandLineArguments()); - Assertions.assertEquals("xagkvtmelmqkrh", model.iconPath()); - Assertions.assertEquals(1107885702, model.iconIndex()); + Assertions.assertEquals("jrjxgciqibrhosx", model.appAlias()); + Assertions.assertEquals("qrhzoymibmrqyib", model.filePath()); + Assertions.assertEquals("wfluszdt", model.commandLineArguments()); + Assertions.assertEquals("rkwofyyvoqa", model.iconPath()); + Assertions.assertEquals(848769798, model.iconIndex()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemListTests.java index f2c6e199ee15..c74224404417 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemListTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemListTests.java @@ -16,13 +16,13 @@ public void testDeserialize() throws Exception { StartMenuItemList model = BinaryData .fromString( - "{\"value\":[{\"properties\":{\"appAlias\":\"g\",\"filePath\":\"dxyt\",\"commandLineArguments\":\"oyrxvwfudwpzntxh\",\"iconPath\":\"hl\",\"iconIndex\":291050041},\"id\":\"bh\",\"name\":\"kfrlhrxsbky\",\"type\":\"pycanuzbpz\"}],\"nextLink\":\"fkuwbcrnwbmehhse\"}") + "{\"value\":[{\"properties\":{\"appAlias\":\"pdggkzzlvm\",\"filePath\":\"paxmodfvuefywsb\",\"commandLineArguments\":\"vmwy\",\"iconPath\":\"fouyf\",\"iconIndex\":938616277},\"id\":\"kcpwiy\",\"name\":\"vqtmnub\",\"type\":\"xkp\"},{\"properties\":{\"appAlias\":\"mond\",\"filePath\":\"quxvypomgkop\",\"commandLineArguments\":\"hojvpajqgxysmocm\",\"iconPath\":\"fqvm\",\"iconIndex\":1181340997},\"id\":\"oz\",\"name\":\"pvhelxprg\",\"type\":\"yat\"}],\"nextLink\":\"ckcb\"}") .toObject(StartMenuItemList.class); - Assertions.assertEquals("g", model.value().get(0).appAlias()); - Assertions.assertEquals("dxyt", model.value().get(0).filePath()); - Assertions.assertEquals("oyrxvwfudwpzntxh", model.value().get(0).commandLineArguments()); - Assertions.assertEquals("hl", model.value().get(0).iconPath()); - Assertions.assertEquals(291050041, model.value().get(0).iconIndex()); + Assertions.assertEquals("pdggkzzlvm", model.value().get(0).appAlias()); + Assertions.assertEquals("paxmodfvuefywsb", model.value().get(0).filePath()); + Assertions.assertEquals("vmwy", model.value().get(0).commandLineArguments()); + Assertions.assertEquals("fouyf", model.value().get(0).iconPath()); + Assertions.assertEquals(938616277, model.value().get(0).iconIndex()); } @org.junit.jupiter.api.Test @@ -33,16 +33,22 @@ public void testSerialize() throws Exception { Arrays .asList( new StartMenuItemInner() - .withAppAlias("g") - .withFilePath("dxyt") - .withCommandLineArguments("oyrxvwfudwpzntxh") - .withIconPath("hl") - .withIconIndex(291050041))); + .withAppAlias("pdggkzzlvm") + .withFilePath("paxmodfvuefywsb") + .withCommandLineArguments("vmwy") + .withIconPath("fouyf") + .withIconIndex(938616277), + new StartMenuItemInner() + .withAppAlias("mond") + .withFilePath("quxvypomgkop") + .withCommandLineArguments("hojvpajqgxysmocm") + .withIconPath("fqvm") + .withIconIndex(1181340997))); model = BinaryData.fromObject(model).toObject(StartMenuItemList.class); - Assertions.assertEquals("g", model.value().get(0).appAlias()); - Assertions.assertEquals("dxyt", model.value().get(0).filePath()); - Assertions.assertEquals("oyrxvwfudwpzntxh", model.value().get(0).commandLineArguments()); - Assertions.assertEquals("hl", model.value().get(0).iconPath()); - Assertions.assertEquals(291050041, model.value().get(0).iconIndex()); + Assertions.assertEquals("pdggkzzlvm", model.value().get(0).appAlias()); + Assertions.assertEquals("paxmodfvuefywsb", model.value().get(0).filePath()); + Assertions.assertEquals("vmwy", model.value().get(0).commandLineArguments()); + Assertions.assertEquals("fouyf", model.value().get(0).iconPath()); + Assertions.assertEquals(938616277, model.value().get(0).iconIndex()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemPropertiesTests.java index 43cdfb957b0b..f90489efdb54 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemPropertiesTests.java @@ -14,29 +14,29 @@ public void testDeserialize() throws Exception { StartMenuItemProperties model = BinaryData .fromString( - "{\"appAlias\":\"crgvxpvgom\",\"filePath\":\"fmisg\",\"commandLineArguments\":\"nbbelda\",\"iconPath\":\"zbaliourqha\",\"iconIndex\":30531984}") + "{\"appAlias\":\"cnqxwbpokulpi\",\"filePath\":\"waasip\",\"commandLineArguments\":\"iobyu\",\"iconPath\":\"rpqlp\",\"iconIndex\":1285990077}") .toObject(StartMenuItemProperties.class); - Assertions.assertEquals("crgvxpvgom", model.appAlias()); - Assertions.assertEquals("fmisg", model.filePath()); - Assertions.assertEquals("nbbelda", model.commandLineArguments()); - Assertions.assertEquals("zbaliourqha", model.iconPath()); - Assertions.assertEquals(30531984, model.iconIndex()); + Assertions.assertEquals("cnqxwbpokulpi", model.appAlias()); + Assertions.assertEquals("waasip", model.filePath()); + Assertions.assertEquals("iobyu", model.commandLineArguments()); + Assertions.assertEquals("rpqlp", model.iconPath()); + Assertions.assertEquals(1285990077, model.iconIndex()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StartMenuItemProperties model = new StartMenuItemProperties() - .withAppAlias("crgvxpvgom") - .withFilePath("fmisg") - .withCommandLineArguments("nbbelda") - .withIconPath("zbaliourqha") - .withIconIndex(30531984); + .withAppAlias("cnqxwbpokulpi") + .withFilePath("waasip") + .withCommandLineArguments("iobyu") + .withIconPath("rpqlp") + .withIconIndex(1285990077); model = BinaryData.fromObject(model).toObject(StartMenuItemProperties.class); - Assertions.assertEquals("crgvxpvgom", model.appAlias()); - Assertions.assertEquals("fmisg", model.filePath()); - Assertions.assertEquals("nbbelda", model.commandLineArguments()); - Assertions.assertEquals("zbaliourqha", model.iconPath()); - Assertions.assertEquals(30531984, model.iconIndex()); + Assertions.assertEquals("cnqxwbpokulpi", model.appAlias()); + Assertions.assertEquals("waasip", model.filePath()); + Assertions.assertEquals("iobyu", model.commandLineArguments()); + Assertions.assertEquals("rpqlp", model.iconPath()); + Assertions.assertEquals(1285990077, model.iconIndex()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListMockTests.java index baf600ee7d82..7c014e40b947 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListMockTests.java @@ -32,7 +32,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"properties\":{\"appAlias\":\"jjxundxgke\",\"filePath\":\"zhhzjhfjmhvvmu\",\"commandLineArguments\":\"pmuneqsx\",\"iconPath\":\"hfbuzjyihsasbhud\",\"iconIndex\":1053625203},\"id\":\"hyuemslyn\",\"name\":\"qyrp\",\"type\":\"oobrlttyms\"}]}"; + "{\"value\":[{\"properties\":{\"appAlias\":\"vwwskondcbr\",\"filePath\":\"muvqejosovyr\",\"commandLineArguments\":\"eaesin\",\"iconPath\":\"tljqobbpih\",\"iconIndex\":1941467727},\"id\":\"ecybmrqbrj\",\"name\":\"bmpxdlvykfrexc\",\"type\":\"s\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -63,18 +63,12 @@ public void testList() throws Exception { PagedIterable response = manager .startMenuItems() - .list( - "sdtutnwlduyc", - "uzhyrmewipmvekdx", - 1888237693, - false, - 1994675840, - com.azure.core.util.Context.NONE); + .list("whqjjyslurlpshhk", "pedwqsl", 510077945, false, 1919863050, com.azure.core.util.Context.NONE); - Assertions.assertEquals("jjxundxgke", response.iterator().next().appAlias()); - Assertions.assertEquals("zhhzjhfjmhvvmu", response.iterator().next().filePath()); - Assertions.assertEquals("pmuneqsx", response.iterator().next().commandLineArguments()); - Assertions.assertEquals("hfbuzjyihsasbhud", response.iterator().next().iconPath()); - Assertions.assertEquals(1053625203, response.iterator().next().iconIndex()); + Assertions.assertEquals("vwwskondcbr", response.iterator().next().appAlias()); + Assertions.assertEquals("muvqejosovyr", response.iterator().next().filePath()); + Assertions.assertEquals("eaesin", response.iterator().next().commandLineArguments()); + Assertions.assertEquals("tljqobbpih", response.iterator().next().iconPath()); + Assertions.assertEquals(1941467727, response.iterator().next().iconIndex()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/TimeTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/TimeTests.java index ecace0fb43e3..263165be8c0a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/TimeTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/TimeTests.java @@ -11,16 +11,16 @@ public final class TimeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Time model = BinaryData.fromString("{\"hour\":632380018,\"minute\":737203180}").toObject(Time.class); - Assertions.assertEquals(632380018, model.hour()); - Assertions.assertEquals(737203180, model.minute()); + Time model = BinaryData.fromString("{\"hour\":1797950253,\"minute\":1146711687}").toObject(Time.class); + Assertions.assertEquals(1797950253, model.hour()); + Assertions.assertEquals(1146711687, model.minute()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Time model = new Time().withHour(632380018).withMinute(737203180); + Time model = new Time().withHour(1797950253).withMinute(1146711687); model = BinaryData.fromObject(model).toObject(Time.class); - Assertions.assertEquals(632380018, model.hour()); - Assertions.assertEquals(737203180, model.minute()); + Assertions.assertEquals(1797950253, model.hour()); + Assertions.assertEquals(1146711687, model.minute()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionInnerTests.java index 661b131c1159..cccf0f849e31 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionInnerTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionInnerTests.java @@ -17,29 +17,29 @@ public void testDeserialize() throws Exception { UserSessionInner model = BinaryData .fromString( - "{\"properties\":{\"objectId\":\"jswsrmslyz\",\"userPrincipalName\":\"zbchckqqzqioxiy\",\"applicationType\":\"Desktop\",\"sessionState\":\"Unknown\",\"activeDirectoryUserName\":\"nkedyatrwyhqmib\",\"createTime\":\"2021-06-15T22:18:06Z\"},\"id\":\"wit\",\"name\":\"mypyynpcdpu\",\"type\":\"nzgmwznmabik\"}") + "{\"properties\":{\"objectId\":\"hneuyowqkd\",\"userPrincipalName\":\"t\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"Pending\",\"activeDirectoryUserName\":\"cgpik\",\"createTime\":\"2021-11-09T05:31:13Z\"},\"id\":\"mejzanlfzxia\",\"name\":\"rmbzo\",\"type\":\"okixrjqcir\"}") .toObject(UserSessionInner.class); - Assertions.assertEquals("zbchckqqzqioxiy", model.userPrincipalName()); - Assertions.assertEquals(ApplicationType.DESKTOP, model.applicationType()); - Assertions.assertEquals(SessionState.UNKNOWN, model.sessionState()); - Assertions.assertEquals("nkedyatrwyhqmib", model.activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-15T22:18:06Z"), model.createTime()); + Assertions.assertEquals("t", model.userPrincipalName()); + Assertions.assertEquals(ApplicationType.REMOTE_APP, model.applicationType()); + Assertions.assertEquals(SessionState.PENDING, model.sessionState()); + Assertions.assertEquals("cgpik", model.activeDirectoryUsername()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-09T05:31:13Z"), model.createTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UserSessionInner model = new UserSessionInner() - .withUserPrincipalName("zbchckqqzqioxiy") - .withApplicationType(ApplicationType.DESKTOP) - .withSessionState(SessionState.UNKNOWN) - .withActiveDirectoryUsername("nkedyatrwyhqmib") - .withCreateTime(OffsetDateTime.parse("2021-06-15T22:18:06Z")); + .withUserPrincipalName("t") + .withApplicationType(ApplicationType.REMOTE_APP) + .withSessionState(SessionState.PENDING) + .withActiveDirectoryUsername("cgpik") + .withCreateTime(OffsetDateTime.parse("2021-11-09T05:31:13Z")); model = BinaryData.fromObject(model).toObject(UserSessionInner.class); - Assertions.assertEquals("zbchckqqzqioxiy", model.userPrincipalName()); - Assertions.assertEquals(ApplicationType.DESKTOP, model.applicationType()); - Assertions.assertEquals(SessionState.UNKNOWN, model.sessionState()); - Assertions.assertEquals("nkedyatrwyhqmib", model.activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-15T22:18:06Z"), model.createTime()); + Assertions.assertEquals("t", model.userPrincipalName()); + Assertions.assertEquals(ApplicationType.REMOTE_APP, model.applicationType()); + Assertions.assertEquals(SessionState.PENDING, model.sessionState()); + Assertions.assertEquals("cgpik", model.activeDirectoryUsername()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-09T05:31:13Z"), model.createTime()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionListTests.java index faf769cd68ac..708c6ae44978 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionListTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionListTests.java @@ -19,13 +19,13 @@ public void testDeserialize() throws Exception { UserSessionList model = BinaryData .fromString( - "{\"value\":[{\"properties\":{\"objectId\":\"obyu\",\"userPrincipalName\":\"rpqlp\",\"applicationType\":\"Desktop\",\"sessionState\":\"Disconnected\",\"activeDirectoryUserName\":\"qgbdbuta\",\"createTime\":\"2021-06-13T06:16:01Z\"},\"id\":\"btkuwhh\",\"name\":\"hykojoxafnndlpic\",\"type\":\"koymkcd\"},{\"properties\":{\"objectId\":\"kkpwdreqnovvq\",\"userPrincipalName\":\"vljxywsu\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"Active\",\"activeDirectoryUserName\":\"dsytgadgvr\",\"createTime\":\"2021-05-05T10:23:30Z\"},\"id\":\"en\",\"name\":\"qnzarrwl\",\"type\":\"uu\"},{\"properties\":{\"objectId\":\"kacewiipfp\",\"userPrincipalName\":\"ji\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"Disconnected\",\"activeDirectoryUserName\":\"ohqkvpuvksgpls\",\"createTime\":\"2021-01-28T10:41:26Z\"},\"id\":\"ynfs\",\"name\":\"n\",\"type\":\"jphuopxodlqi\"}],\"nextLink\":\"torzih\"}") + "{\"value\":[{\"properties\":{\"objectId\":\"p\",\"userPrincipalName\":\"cstwity\",\"applicationType\":\"Desktop\",\"sessionState\":\"UserProfileDiskMounted\",\"activeDirectoryUserName\":\"cedcpnmdy\",\"createTime\":\"2021-08-04T00:15:47Z\"},\"id\":\"wzxltjc\",\"name\":\"nhltiugcxn\",\"type\":\"vvwxqi\"},{\"properties\":{\"objectId\":\"nyowxwlmdjrkvfg\",\"userPrincipalName\":\"fvpdbo\",\"applicationType\":\"Desktop\",\"sessionState\":\"Disconnected\",\"activeDirectoryUserName\":\"j\",\"createTime\":\"2021-03-04T03:48:03Z\"},\"id\":\"krribdeibqi\",\"name\":\"qkgh\",\"type\":\"xndzwm\"},{\"properties\":{\"objectId\":\"ajpjo\",\"userPrincipalName\":\"kqnyh\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"Active\",\"activeDirectoryUserName\":\"ivfxzsjabibsyst\",\"createTime\":\"2021-05-13T21:12:04Z\"},\"id\":\"sdjpvkvp\",\"name\":\"jxbkzbzkdvn\",\"type\":\"jabudurgkakmo\"},{\"properties\":{\"objectId\":\"jk\",\"userPrincipalName\":\"fhmouwq\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"Active\",\"activeDirectoryUserName\":\"eeyebi\",\"createTime\":\"2021-05-17T10:43:36Z\"},\"id\":\"ayuhqlbjbsy\",\"name\":\"bqwrvtldgm\",\"type\":\"pgvmpipaslthaqfx\"}],\"nextLink\":\"mwutwbdsre\"}") .toObject(UserSessionList.class); - Assertions.assertEquals("rpqlp", model.value().get(0).userPrincipalName()); + Assertions.assertEquals("cstwity", model.value().get(0).userPrincipalName()); Assertions.assertEquals(ApplicationType.DESKTOP, model.value().get(0).applicationType()); - Assertions.assertEquals(SessionState.DISCONNECTED, model.value().get(0).sessionState()); - Assertions.assertEquals("qgbdbuta", model.value().get(0).activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-13T06:16:01Z"), model.value().get(0).createTime()); + Assertions.assertEquals(SessionState.USER_PROFILE_DISK_MOUNTED, model.value().get(0).sessionState()); + Assertions.assertEquals("cedcpnmdy", model.value().get(0).activeDirectoryUsername()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T00:15:47Z"), model.value().get(0).createTime()); } @org.junit.jupiter.api.Test @@ -36,28 +36,34 @@ public void testSerialize() throws Exception { Arrays .asList( new UserSessionInner() - .withUserPrincipalName("rpqlp") + .withUserPrincipalName("cstwity") + .withApplicationType(ApplicationType.DESKTOP) + .withSessionState(SessionState.USER_PROFILE_DISK_MOUNTED) + .withActiveDirectoryUsername("cedcpnmdy") + .withCreateTime(OffsetDateTime.parse("2021-08-04T00:15:47Z")), + new UserSessionInner() + .withUserPrincipalName("fvpdbo") .withApplicationType(ApplicationType.DESKTOP) .withSessionState(SessionState.DISCONNECTED) - .withActiveDirectoryUsername("qgbdbuta") - .withCreateTime(OffsetDateTime.parse("2021-06-13T06:16:01Z")), + .withActiveDirectoryUsername("j") + .withCreateTime(OffsetDateTime.parse("2021-03-04T03:48:03Z")), new UserSessionInner() - .withUserPrincipalName("vljxywsu") + .withUserPrincipalName("kqnyh") .withApplicationType(ApplicationType.REMOTE_APP) .withSessionState(SessionState.ACTIVE) - .withActiveDirectoryUsername("dsytgadgvr") - .withCreateTime(OffsetDateTime.parse("2021-05-05T10:23:30Z")), + .withActiveDirectoryUsername("ivfxzsjabibsyst") + .withCreateTime(OffsetDateTime.parse("2021-05-13T21:12:04Z")), new UserSessionInner() - .withUserPrincipalName("ji") + .withUserPrincipalName("fhmouwq") .withApplicationType(ApplicationType.REMOTE_APP) - .withSessionState(SessionState.DISCONNECTED) - .withActiveDirectoryUsername("ohqkvpuvksgpls") - .withCreateTime(OffsetDateTime.parse("2021-01-28T10:41:26Z")))); + .withSessionState(SessionState.ACTIVE) + .withActiveDirectoryUsername("eeyebi") + .withCreateTime(OffsetDateTime.parse("2021-05-17T10:43:36Z")))); model = BinaryData.fromObject(model).toObject(UserSessionList.class); - Assertions.assertEquals("rpqlp", model.value().get(0).userPrincipalName()); + Assertions.assertEquals("cstwity", model.value().get(0).userPrincipalName()); Assertions.assertEquals(ApplicationType.DESKTOP, model.value().get(0).applicationType()); - Assertions.assertEquals(SessionState.DISCONNECTED, model.value().get(0).sessionState()); - Assertions.assertEquals("qgbdbuta", model.value().get(0).activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-13T06:16:01Z"), model.value().get(0).createTime()); + Assertions.assertEquals(SessionState.USER_PROFILE_DISK_MOUNTED, model.value().get(0).sessionState()); + Assertions.assertEquals("cedcpnmdy", model.value().get(0).activeDirectoryUsername()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T00:15:47Z"), model.value().get(0).createTime()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionPropertiesTests.java index 2293627435d9..cae536540b69 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionPropertiesTests.java @@ -17,29 +17,29 @@ public void testDeserialize() throws Exception { UserSessionProperties model = BinaryData .fromString( - "{\"objectId\":\"orgjhxbldt\",\"userPrincipalName\":\"wrlkdmtn\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"Unknown\",\"activeDirectoryUserName\":\"llxdyhgs\",\"createTime\":\"2021-10-24T07:42:50Z\"}") + "{\"objectId\":\"pfrlazsz\",\"userPrincipalName\":\"woiindf\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"Active\",\"activeDirectoryUserName\":\"wbtlhflsjcdh\",\"createTime\":\"2021-08-12T16:31:07Z\"}") .toObject(UserSessionProperties.class); - Assertions.assertEquals("wrlkdmtn", model.userPrincipalName()); + Assertions.assertEquals("woiindf", model.userPrincipalName()); Assertions.assertEquals(ApplicationType.REMOTE_APP, model.applicationType()); - Assertions.assertEquals(SessionState.UNKNOWN, model.sessionState()); - Assertions.assertEquals("llxdyhgs", model.activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-24T07:42:50Z"), model.createTime()); + Assertions.assertEquals(SessionState.ACTIVE, model.sessionState()); + Assertions.assertEquals("wbtlhflsjcdh", model.activeDirectoryUsername()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T16:31:07Z"), model.createTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UserSessionProperties model = new UserSessionProperties() - .withUserPrincipalName("wrlkdmtn") + .withUserPrincipalName("woiindf") .withApplicationType(ApplicationType.REMOTE_APP) - .withSessionState(SessionState.UNKNOWN) - .withActiveDirectoryUsername("llxdyhgs") - .withCreateTime(OffsetDateTime.parse("2021-10-24T07:42:50Z")); + .withSessionState(SessionState.ACTIVE) + .withActiveDirectoryUsername("wbtlhflsjcdh") + .withCreateTime(OffsetDateTime.parse("2021-08-12T16:31:07Z")); model = BinaryData.fromObject(model).toObject(UserSessionProperties.class); - Assertions.assertEquals("wrlkdmtn", model.userPrincipalName()); + Assertions.assertEquals("woiindf", model.userPrincipalName()); Assertions.assertEquals(ApplicationType.REMOTE_APP, model.applicationType()); - Assertions.assertEquals(SessionState.UNKNOWN, model.sessionState()); - Assertions.assertEquals("llxdyhgs", model.activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-24T07:42:50Z"), model.createTime()); + Assertions.assertEquals(SessionState.ACTIVE, model.sessionState()); + Assertions.assertEquals("wbtlhflsjcdh", model.activeDirectoryUsername()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T16:31:07Z"), model.createTime()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteWithResponseMockTests.java index f19920acfa03..5bdd9e1b74e6 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteWithResponseMockTests.java @@ -58,6 +58,7 @@ public void testDeleteWithResponse() throws Exception { manager .userSessions() - .deleteWithResponse("zcyjtot", "vopvp", "dbzqgqqihed", "vqwt", false, com.azure.core.util.Context.NONE); + .deleteWithResponse( + "aifghtmoqqt", "ffhzbkrkjjjavfq", "vhnqo", "wdogiyetesyp", false, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectWithResponseMockTests.java index 970167492830..38aa2de0acdd 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectWithResponseMockTests.java @@ -58,6 +58,7 @@ public void testDisconnectWithResponse() throws Exception { manager .userSessions() - .disconnectWithResponse("czurtlei", "q", "bkwvzg", "zvd", com.azure.core.util.Context.NONE); + .disconnectWithResponse( + "bsjuscvsfx", "gctmgxuupbezq", "cydrtceukdqkk", "ihztgeqmgqzgwldo", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetWithResponseMockTests.java index 62e19ceb7b12..37e3e2ee72ea 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetWithResponseMockTests.java @@ -33,7 +33,7 @@ public void testGetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"objectId\":\"g\",\"userPrincipalName\":\"hcmavmqfo\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"Pending\",\"activeDirectoryUserName\":\"gyyprotwy\",\"createTime\":\"2020-12-26T18:22:26Z\"},\"id\":\"d\",\"name\":\"bxhugcmjkavlgorb\",\"type\":\"ftpmdtzfjltfv\"}"; + "{\"properties\":{\"objectId\":\"rttuiaclkiexha\",\"userPrincipalName\":\"fnth\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"LogOff\",\"activeDirectoryUserName\":\"t\",\"createTime\":\"2021-07-20T02:29:06Z\"},\"id\":\"gbpvnwswmtxkyct\",\"name\":\"wgzwxjlmecvog\",\"type\":\"gzyvnee\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -64,14 +64,13 @@ public void testGetWithResponse() throws Exception { UserSession response = manager .userSessions() - .getWithResponse( - "prlpy", "nuciqdsmexiit", "fuxtyasiibmiybnn", "stgnl", com.azure.core.util.Context.NONE) + .getWithResponse("gsksrfhf", "olmk", "bnxwc", "ommpvfqaw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hcmavmqfo", response.userPrincipalName()); + Assertions.assertEquals("fnth", response.userPrincipalName()); Assertions.assertEquals(ApplicationType.REMOTE_APP, response.applicationType()); - Assertions.assertEquals(SessionState.PENDING, response.sessionState()); - Assertions.assertEquals("gyyprotwy", response.activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-26T18:22:26Z"), response.createTime()); + Assertions.assertEquals(SessionState.LOG_OFF, response.sessionState()); + Assertions.assertEquals("t", response.activeDirectoryUsername()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T02:29:06Z"), response.createTime()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolMockTests.java index be9c65a7af21..7d15f961e455 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolMockTests.java @@ -34,7 +34,7 @@ public void testListByHostPool() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"properties\":{\"objectId\":\"btijvacvbm\",\"userPrincipalName\":\"bqqxlaj\",\"applicationType\":\"Desktop\",\"sessionState\":\"UserProfileDiskMounted\",\"activeDirectoryUserName\":\"evehjkuyxoaf\",\"createTime\":\"2021-03-08T11:58:40Z\"},\"id\":\"qltfaey\",\"name\":\"inmfgvxirp\",\"type\":\"hriypoqeyhlqhy\"}]}"; + "{\"value\":[{\"properties\":{\"objectId\":\"qnrmvvfko\",\"userPrincipalName\":\"lghktuidvrm\",\"applicationType\":\"Desktop\",\"sessionState\":\"Pending\",\"activeDirectoryUserName\":\"wex\",\"createTime\":\"2021-08-07T05:35:14Z\"},\"id\":\"vlazipbhpwvqsgny\",\"name\":\"uuzivensrpmeyyvp\",\"type\":\"patlbijp\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -66,18 +66,12 @@ public void testListByHostPool() throws Exception { manager .userSessions() .listByHostPool( - "yhsgz", - "czbgomfgbeg", - "qgleohibetnluank", - 416708927, - true, - 1893496735, - com.azure.core.util.Context.NONE); + "duczkgof", "y", "srucvcrrpcjtt", 411078462, false, 2056089114, com.azure.core.util.Context.NONE); - Assertions.assertEquals("bqqxlaj", response.iterator().next().userPrincipalName()); + Assertions.assertEquals("lghktuidvrm", response.iterator().next().userPrincipalName()); Assertions.assertEquals(ApplicationType.DESKTOP, response.iterator().next().applicationType()); - Assertions.assertEquals(SessionState.USER_PROFILE_DISK_MOUNTED, response.iterator().next().sessionState()); - Assertions.assertEquals("evehjkuyxoaf", response.iterator().next().activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-08T11:58:40Z"), response.iterator().next().createTime()); + Assertions.assertEquals(SessionState.PENDING, response.iterator().next().sessionState()); + Assertions.assertEquals("wex", response.iterator().next().activeDirectoryUsername()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-07T05:35:14Z"), response.iterator().next().createTime()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListMockTests.java index 2514f08a7e2f..1f3062a9bb99 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListMockTests.java @@ -34,7 +34,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"properties\":{\"objectId\":\"hdxbzlm\",\"userPrincipalName\":\"uapcvhdbevwqqxe\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"LogOff\",\"activeDirectoryUserName\":\"zinkfkbgbzbowxeq\",\"createTime\":\"2021-11-27T16:03:54Z\"},\"id\":\"jmygvk\",\"name\":\"qkjjeokbz\",\"type\":\"fezrx\"}]}"; + "{\"value\":[{\"properties\":{\"objectId\":\"upia\",\"userPrincipalName\":\"xnafbw\",\"applicationType\":\"Desktop\",\"sessionState\":\"LogOff\",\"activeDirectoryUserName\":\"uovmaonurjt\",\"createTime\":\"2021-05-12T05:44:48Z\"},\"id\":\"hihpvecmsl\",\"name\":\"lbl\",\"type\":\"jxl\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -65,12 +65,13 @@ public void testList() throws Exception { PagedIterable response = manager .userSessions() - .list("ky", "bcysih", "gqcwdhohsdtmc", 582075475, false, 223413800, com.azure.core.util.Context.NONE); + .list( + "dbztjhqtfbov", "ynkbwetnju", "p", 1399052652, true, 1446166939, com.azure.core.util.Context.NONE); - Assertions.assertEquals("uapcvhdbevwqqxe", response.iterator().next().userPrincipalName()); - Assertions.assertEquals(ApplicationType.REMOTE_APP, response.iterator().next().applicationType()); + Assertions.assertEquals("xnafbw", response.iterator().next().userPrincipalName()); + Assertions.assertEquals(ApplicationType.DESKTOP, response.iterator().next().applicationType()); Assertions.assertEquals(SessionState.LOG_OFF, response.iterator().next().sessionState()); - Assertions.assertEquals("zinkfkbgbzbowxeq", response.iterator().next().activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-27T16:03:54Z"), response.iterator().next().createTime()); + Assertions.assertEquals("uovmaonurjt", response.iterator().next().activeDirectoryUsername()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-12T05:44:48Z"), response.iterator().next().createTime()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageWithResponseMockTests.java index 4f8bcef1661c..2635e1854eea 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageWithResponseMockTests.java @@ -60,11 +60,11 @@ public void testSendMessageWithResponse() throws Exception { manager .userSessions() .sendMessageWithResponse( - "bzdixzmq", - "noda", - "opqhewjptmc", - "sbostzel", - new SendMessage().withMessageTitle("la").withMessageBody("tmzlbiojlv"), + "chillcecf", + "huwaoaguhic", + "llizs", + "ac", + new SendMessage().withMessageTitle("vhrweftkwqejpmv").withMessageBody("ehaepwamcxtc"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchPropertiesTests.java index 727d978a5eb6..b5f41976f944 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchPropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchPropertiesTests.java @@ -6,6 +6,7 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.WorkspacePatchProperties; +import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -15,23 +16,26 @@ public void testDeserialize() throws Exception { WorkspacePatchProperties model = BinaryData .fromString( - "{\"description\":\"izuckyfihrfidfvz\",\"friendlyName\":\"zuhtymwisdkfthwx\",\"applicationGroupReferences\":[\"eiwaopvkmi\"]}") + "{\"description\":\"rzafbljjgpbtoqcj\",\"friendlyName\":\"ljavbqid\",\"applicationGroupReferences\":[\"jzyulpk\",\"dj\"],\"publicNetworkAccess\":\"Enabled\"}") .toObject(WorkspacePatchProperties.class); - Assertions.assertEquals("izuckyfihrfidfvz", model.description()); - Assertions.assertEquals("zuhtymwisdkfthwx", model.friendlyName()); - Assertions.assertEquals("eiwaopvkmi", model.applicationGroupReferences().get(0)); + Assertions.assertEquals("rzafbljjgpbtoqcj", model.description()); + Assertions.assertEquals("ljavbqid", model.friendlyName()); + Assertions.assertEquals("jzyulpk", model.applicationGroupReferences().get(0)); + Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkspacePatchProperties model = new WorkspacePatchProperties() - .withDescription("izuckyfihrfidfvz") - .withFriendlyName("zuhtymwisdkfthwx") - .withApplicationGroupReferences(Arrays.asList("eiwaopvkmi")); + .withDescription("rzafbljjgpbtoqcj") + .withFriendlyName("ljavbqid") + .withApplicationGroupReferences(Arrays.asList("jzyulpk", "dj")) + .withPublicNetworkAccess(PublicNetworkAccess.ENABLED); model = BinaryData.fromObject(model).toObject(WorkspacePatchProperties.class); - Assertions.assertEquals("izuckyfihrfidfvz", model.description()); - Assertions.assertEquals("zuhtymwisdkfthwx", model.friendlyName()); - Assertions.assertEquals("eiwaopvkmi", model.applicationGroupReferences().get(0)); + Assertions.assertEquals("rzafbljjgpbtoqcj", model.description()); + Assertions.assertEquals("ljavbqid", model.friendlyName()); + Assertions.assertEquals("jzyulpk", model.applicationGroupReferences().get(0)); + Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchTests.java index a458811629a4..d048ed4602b7 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchTests.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.desktopvirtualization.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.WorkspacePatch; import java.util.Arrays; import java.util.HashMap; @@ -17,38 +18,33 @@ public void testDeserialize() throws Exception { WorkspacePatch model = BinaryData .fromString( - "{\"tags\":{\"ppbhtqqrolfp\":\"mbe\",\"gjyjgzjaoyfhrtxi\":\"psalgbqux\",\"rkujy\":\"n\",\"rlyxwjkcprbnw\":\"vlejuvfqa\"},\"properties\":{\"description\":\"jvtbvpyss\",\"friendlyName\":\"nruj\",\"applicationGroupReferences\":[\"hmuouqfprwzwbn\",\"uitnwuiz\",\"a\",\"x\"]}}") + "{\"tags\":{\"wjdk\":\"qrimzinpv\",\"t\":\"rsoodqxhcrmnoh\"},\"properties\":{\"description\":\"h\",\"friendlyName\":\"oifiyipjxsqwpgr\",\"applicationGroupReferences\":[\"norcjxvsnbyxqab\",\"mocpc\"],\"publicNetworkAccess\":\"Disabled\"}}") .toObject(WorkspacePatch.class); - Assertions.assertEquals("mbe", model.tags().get("ppbhtqqrolfp")); - Assertions.assertEquals("jvtbvpyss", model.description()); - Assertions.assertEquals("nruj", model.friendlyName()); - Assertions.assertEquals("hmuouqfprwzwbn", model.applicationGroupReferences().get(0)); + Assertions.assertEquals("qrimzinpv", model.tags().get("wjdk")); + Assertions.assertEquals("h", model.description()); + Assertions.assertEquals("oifiyipjxsqwpgr", model.friendlyName()); + Assertions.assertEquals("norcjxvsnbyxqab", model.applicationGroupReferences().get(0)); + Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkspacePatch model = new WorkspacePatch() - .withTags( - mapOf( - "ppbhtqqrolfp", - "mbe", - "gjyjgzjaoyfhrtxi", - "psalgbqux", - "rkujy", - "n", - "rlyxwjkcprbnw", - "vlejuvfqa")) - .withDescription("jvtbvpyss") - .withFriendlyName("nruj") - .withApplicationGroupReferences(Arrays.asList("hmuouqfprwzwbn", "uitnwuiz", "a", "x")); + .withTags(mapOf("wjdk", "qrimzinpv", "t", "rsoodqxhcrmnoh")) + .withDescription("h") + .withFriendlyName("oifiyipjxsqwpgr") + .withApplicationGroupReferences(Arrays.asList("norcjxvsnbyxqab", "mocpc")) + .withPublicNetworkAccess(PublicNetworkAccess.DISABLED); model = BinaryData.fromObject(model).toObject(WorkspacePatch.class); - Assertions.assertEquals("mbe", model.tags().get("ppbhtqqrolfp")); - Assertions.assertEquals("jvtbvpyss", model.description()); - Assertions.assertEquals("nruj", model.friendlyName()); - Assertions.assertEquals("hmuouqfprwzwbn", model.applicationGroupReferences().get(0)); + Assertions.assertEquals("qrimzinpv", model.tags().get("wjdk")); + Assertions.assertEquals("h", model.description()); + Assertions.assertEquals("oifiyipjxsqwpgr", model.friendlyName()); + Assertions.assertEquals("norcjxvsnbyxqab", model.applicationGroupReferences().get(0)); + Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePropertiesTests.java index b89ecbe64dad..cc6f2cde76eb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePropertiesTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePropertiesTests.java @@ -6,6 +6,7 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.WorkspaceProperties; +import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -15,23 +16,26 @@ public void testDeserialize() throws Exception { WorkspaceProperties model = BinaryData .fromString( - "{\"objectId\":\"jofxqe\",\"description\":\"jaeq\",\"friendlyName\":\"qjbasvms\",\"applicationGroupReferences\":[\"ulngsntn\",\"ybkzgcwr\",\"clxxwrljdo\",\"skcqvkocrcjd\"],\"cloudPcResource\":false}") + "{\"objectId\":\"xzxtheo\",\"description\":\"si\",\"friendlyName\":\"evcciqihnhun\",\"applicationGroupReferences\":[\"jzrnf\",\"gxg\",\"spemvtzfk\",\"fublj\"],\"cloudPcResource\":true,\"publicNetworkAccess\":\"Disabled\",\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"qjhqjbas\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"jqul\",\"actionsRequired\":\"sntnbybkzgcw\"},\"provisioningState\":\"Deleting\"},\"id\":\"lxxwrljdouskc\",\"name\":\"vkocrcjdkwtn\",\"type\":\"xbnjbiksq\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"sainqpjwnzl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"ppeebvmgxsab\",\"actionsRequired\":\"qduujitcjczdz\"},\"provisioningState\":\"Creating\"},\"id\":\"dhkrwpdappdsbdk\",\"name\":\"wrwjfeu\",\"type\":\"nhutjeltmrldhugj\"}]}") .toObject(WorkspaceProperties.class); - Assertions.assertEquals("jaeq", model.description()); - Assertions.assertEquals("qjbasvms", model.friendlyName()); - Assertions.assertEquals("ulngsntn", model.applicationGroupReferences().get(0)); + Assertions.assertEquals("si", model.description()); + Assertions.assertEquals("evcciqihnhun", model.friendlyName()); + Assertions.assertEquals("jzrnf", model.applicationGroupReferences().get(0)); + Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkspaceProperties model = new WorkspaceProperties() - .withDescription("jaeq") - .withFriendlyName("qjbasvms") - .withApplicationGroupReferences(Arrays.asList("ulngsntn", "ybkzgcwr", "clxxwrljdo", "skcqvkocrcjd")); + .withDescription("si") + .withFriendlyName("evcciqihnhun") + .withApplicationGroupReferences(Arrays.asList("jzrnf", "gxg", "spemvtzfk", "fublj")) + .withPublicNetworkAccess(PublicNetworkAccess.DISABLED); model = BinaryData.fromObject(model).toObject(WorkspaceProperties.class); - Assertions.assertEquals("jaeq", model.description()); - Assertions.assertEquals("qjbasvms", model.friendlyName()); - Assertions.assertEquals("ulngsntn", model.applicationGroupReferences().get(0)); + Assertions.assertEquals("si", model.description()); + Assertions.assertEquals("evcciqihnhun", model.friendlyName()); + Assertions.assertEquals("jzrnf", model.applicationGroupReferences().get(0)); + Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteByResourceGroupWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteByResourceGroupWithResponseMockTests.java index 02820ea3c8bb..ed02fe0eb21b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteByResourceGroupWithResponseMockTests.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteByResourceGroupWithResponseMockTests.java @@ -56,6 +56,6 @@ public void testDeleteWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workspaces().deleteByResourceGroupWithResponse("thrrgh", "jbdhqxvc", com.azure.core.util.Context.NONE); + manager.workspaces().deleteByResourceGroupWithResponse("ecuijpxtxs", "wprtu", com.azure.core.util.Context.NONE); } }