From 1a569f51b73d3aa093760509a67a5191f5ebed4a Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 18 Sep 2023 20:40:53 +0000 Subject: [PATCH] CodeGen from PR 25747 in Azure/azure-rest-api-specs Alec baird desktopvirtualization microsoft.desktop virtualization 2023 09 05 (#25747) * Adds base for updating Microsoft.DesktopVirtualization from version preview/2023-07-07-preview to version 2023-09-05 * Updates readme * Updates API version in new specs and examples * Added Scaling breaking changes to swagger --- .../CHANGELOG.md | 4 +- .../README.md | 6 +- .../SAMPLE.md | 591 ++++- .../pom.xml | 3 +- .../DesktopVirtualizationManager.java | 58 +- .../DesktopVirtualizationApiClient.java | 21 + .../PrivateEndpointConnectionsClient.java | 558 +++++ .../fluent/PrivateLinkResourcesClient.java | 147 ++ .../ScalingPlanPersonalSchedulesClient.java | 353 +++ .../fluent/models/ApplicationGroupInner.java | 23 + .../ApplicationGroupPatchProperties.java | 26 + .../models/ApplicationGroupProperties.java | 26 + .../fluent/models/HostPoolInner.java | 37 + .../models/HostPoolPatchProperties.java | 27 + .../models/HostPoolPropertiesInner.java | 50 + .../PrivateEndpointConnectionProperties.java | 112 + ...EndpointConnectionWithSystemDataInner.java | 60 + .../models/PrivateLinkResourceInner.java | 85 + .../models/PrivateLinkResourceProperties.java | 81 + .../ScalingPlanPersonalScheduleInner.java | 711 ++++++ ...ScalingPlanPersonalScheduleProperties.java | 775 +++++++ .../fluent/models/WorkspaceInner.java | 37 + .../models/WorkspacePatchProperties.java | 27 + .../fluent/models/WorkspaceProperties.java | 50 + .../implementation/ApplicationGroupImpl.java | 14 + ...DesktopVirtualizationApiClientBuilder.java | 2 +- .../DesktopVirtualizationApiClientImpl.java | 44 +- .../implementation/HostPoolImpl.java | 25 + .../HostPoolPropertiesImpl.java | 15 + ...eEndpointConnectionWithSystemDataImpl.java | 61 + .../PrivateEndpointConnectionsClientImpl.java | 1898 +++++++++++++++++ .../PrivateEndpointConnectionsImpl.java | 229 ++ .../PrivateLinkResourceImpl.java | 65 + .../PrivateLinkResourcesClientImpl.java | 758 +++++++ .../PrivateLinkResourcesImpl.java | 76 + .../ScalingPlanPersonalScheduleImpl.java | 536 +++++ ...calingPlanPersonalSchedulesClientImpl.java | 1197 +++++++++++ .../ScalingPlanPersonalSchedulesImpl.java | 211 ++ .../implementation/WorkspaceImpl.java | 25 + .../models/Application.java | 28 + .../models/ApplicationGroup.java | 59 +- .../models/ApplicationGroupPatch.java | 23 + .../models/HostPool.java | 91 + .../models/HostPoolPatch.java | 23 + .../models/HostPoolProperties.java | 16 + .../models/HostpoolPublicNetworkAccess.java | 57 + .../models/MsixPackage.java | 19 + .../models/PrivateEndpoint.java | 39 + .../models/PrivateEndpointConnection.java | 102 + ...intConnectionListResultWithSystemData.java | 71 + ...teEndpointConnectionProvisioningState.java | 54 + ...ivateEndpointConnectionWithSystemData.java | 70 + .../models/PrivateEndpointConnections.java | 278 +++ ...rivateEndpointServiceConnectionStatus.java | 51 + .../models/PrivateLinkResource.java | 60 + .../models/PrivateLinkResourceListResult.java | 70 + .../models/PrivateLinkResources.java | 79 + .../PrivateLinkServiceConnectionState.java | 106 + .../models/PublicNetworkAccess.java | 50 + .../models/ScalingPlan.java | 26 + .../models/ScalingPlanPersonalSchedule.java | 1049 +++++++++ .../ScalingPlanPersonalScheduleList.java | 74 + .../ScalingPlanPersonalSchedulePatch.java | 682 ++++++ .../models/ScalingPlanPersonalSchedules.java | 154 ++ .../models/ScalingPlanPooledSchedule.java | 39 + .../models/SessionHandlingOperation.java | 50 + .../models/SetStartVMOnConnect.java | 50 + .../models/StartupBehavior.java | 50 + .../models/Workspace.java | 66 +- .../models/WorkspacePatch.java | 23 + ...pplicationGroupsCreateOrUpdateSamples.java | 4 +- .../ApplicationGroupsDeleteSamples.java | 2 +- ...cationGroupsGetByResourceGroupSamples.java | 2 +- ...ationGroupsListByResourceGroupSamples.java | 2 +- .../ApplicationGroupsListSamples.java | 2 +- .../ApplicationGroupsUpdateSamples.java | 4 +- .../ApplicationsCreateOrUpdateSamples.java | 2 +- .../generated/ApplicationsDeleteSamples.java | 2 +- .../generated/ApplicationsGetSamples.java | 2 +- .../generated/ApplicationsListSamples.java | 2 +- .../generated/ApplicationsUpdateSamples.java | 2 +- .../generated/DesktopsGetSamples.java | 2 +- .../generated/DesktopsListSamples.java | 2 +- .../generated/DesktopsUpdateSamples.java | 2 +- .../HostPoolsCreateOrUpdateSamples.java | 3 +- .../generated/HostPoolsDeleteSamples.java | 2 +- .../HostPoolsGetByResourceGroupSamples.java | 2 +- .../HostPoolsListByResourceGroupSamples.java | 2 +- .../generated/HostPoolsListSamples.java | 2 +- ...PoolsRetrieveRegistrationTokenSamples.java | 2 +- .../generated/HostPoolsUpdateSamples.java | 3 +- .../generated/MsixImagesExpandSamples.java | 2 +- .../MsixPackagesCreateOrUpdateSamples.java | 2 +- .../generated/MsixPackagesDeleteSamples.java | 2 +- .../generated/MsixPackagesGetSamples.java | 2 +- .../generated/MsixPackagesListSamples.java | 2 +- .../generated/MsixPackagesUpdateSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- ...intConnectionsDeleteByHostPoolSamples.java | 27 + ...ntConnectionsDeleteByWorkspaceSamples.java | 27 + ...dpointConnectionsGetByHostPoolSamples.java | 27 + ...pointConnectionsGetByWorkspaceSamples.java | 27 + ...pointConnectionsListByHostPoolSamples.java | 23 + ...ointConnectionsListByWorkspaceSamples.java | 23 + ...intConnectionsUpdateByHostPoolSamples.java | 37 + ...ntConnectionsUpdateByWorkspaceSamples.java | 37 + ...ateLinkResourcesListByHostPoolSamples.java | 23 + ...teLinkResourcesListByWorkspaceSamples.java | 23 + ...ingPlanPersonalSchedulesCreateSamples.java | 61 + ...ingPlanPersonalSchedulesDeleteSamples.java | 24 + ...calingPlanPersonalSchedulesGetSamples.java | 27 + ...alingPlanPersonalSchedulesListSamples.java | 23 + ...ingPlanPersonalSchedulesUpdateSamples.java | 50 + ...alingPlanPooledSchedulesCreateSamples.java | 2 +- ...alingPlanPooledSchedulesDeleteSamples.java | 2 +- .../ScalingPlanPooledSchedulesGetSamples.java | 2 +- ...ScalingPlanPooledSchedulesListSamples.java | 2 +- ...alingPlanPooledSchedulesUpdateSamples.java | 2 +- .../generated/ScalingPlansCreateSamples.java | 3 +- .../generated/ScalingPlansDeleteSamples.java | 2 +- ...ScalingPlansGetByResourceGroupSamples.java | 2 +- .../ScalingPlansListByHostPoolSamples.java | 2 +- ...calingPlansListByResourceGroupSamples.java | 2 +- .../generated/ScalingPlansListSamples.java | 2 +- .../generated/ScalingPlansUpdateSamples.java | 2 +- .../generated/SessionHostsDeleteSamples.java | 2 +- .../generated/SessionHostsGetSamples.java | 2 +- .../generated/SessionHostsListSamples.java | 2 +- .../generated/SessionHostsUpdateSamples.java | 2 +- .../generated/StartMenuItemsListSamples.java | 2 +- .../generated/UserSessionsDeleteSamples.java | 2 +- .../UserSessionsDisconnectSamples.java | 2 +- .../generated/UserSessionsGetSamples.java | 2 +- .../UserSessionsListByHostPoolSamples.java | 2 +- .../generated/UserSessionsListSamples.java | 2 +- .../UserSessionsSendMessageSamples.java | 2 +- .../WorkspacesCreateOrUpdateSamples.java | 3 +- .../generated/WorkspacesDeleteSamples.java | 2 +- .../WorkspacesGetByResourceGroupSamples.java | 2 +- .../WorkspacesListByResourceGroupSamples.java | 2 +- .../generated/WorkspacesListSamples.java | 2 +- .../generated/WorkspacesUpdateSamples.java | 3 +- .../AgentUpdatePatchPropertiesTests.java | 54 - .../generated/AgentUpdatePropertiesTests.java | 50 - .../ApplicationGroupPatchPropertiesTests.java | 30 - .../generated/ApplicationGroupPatchTests.java | 49 - .../ApplicationGroupPropertiesTests.java | 40 - ...eByResourceGroupWithResponseMockTests.java | 61 - .../generated/ApplicationInnerTests.java | 62 - .../generated/ApplicationListTests.java | 92 - .../ApplicationPatchPropertiesTests.java | 62 - .../generated/ApplicationPatchTests.java | 78 - .../generated/ApplicationPropertiesTests.java | 62 - ...nsCreateOrUpdateWithResponseMockTests.java | 94 - ...plicationsDeleteWithResponseMockTests.java | 63 - .../ApplicationsGetWithResponseMockTests.java | 82 - .../generated/ApplicationsListMockTests.java | 82 - .../generated/DesktopInnerTests.java | 30 - .../generated/DesktopListTests.java | 37 - .../DesktopPatchPropertiesTests.java | 30 - .../generated/DesktopPatchTests.java | 58 - .../generated/DesktopPropertiesTests.java | 31 - .../DesktopsGetWithResponseMockTests.java | 71 - .../generated/DesktopsListMockTests.java | 71 - .../DesktopsUpdateWithResponseMockTests.java | 94 - .../generated/ExpandMsixImageInnerTests.java | 116 - .../generated/ExpandMsixImageListTests.java | 83 - .../ExpandMsixImagePropertiesTests.java | 110 - .../HostPoolsDeleteWithResponseMockTests.java | 63 - .../generated/IdentityTests.java | 28 - .../generated/LogSpecificationTests.java | 36 - ...MaintenanceWindowPatchPropertiesTests.java | 31 - .../MaintenanceWindowPropertiesTests.java | 31 - .../generated/MsixImageUriTests.java | 24 - .../generated/MsixImagesExpandMockTests.java | 81 - .../MsixPackageApplicationsTests.java | 42 - .../MsixPackageDependenciesTests.java | 35 - .../generated/MsixPackageInnerTests.java | 102 - .../generated/MsixPackageListTests.java | 63 - .../MsixPackagePatchPropertiesTests.java | 35 - .../generated/MsixPackagePatchTests.java | 33 - .../generated/MsixPackagePropertiesTests.java | 112 - ...esCreateOrUpdateWithResponseMockTests.java | 91 - ...ixPackagesDeleteWithResponseMockTests.java | 63 - .../MsixPackagesGetWithResponseMockTests.java | 78 - .../generated/MsixPackagesListMockTests.java | 78 - .../generated/OperationPropertiesTests.java | 54 - .../generated/OperationsListMockTests.java | 72 - ...elWithAllowedPropertySetIdentityTests.java | 29 - ...ceModelWithAllowedPropertySetSkuTests.java | 43 - ...ResourceProviderOperationDisplayTests.java | 39 - .../ResourceProviderOperationInnerTests.java | 54 - .../ResourceProviderOperationListTests.java | 76 - .../ScalingHostPoolReferenceTests.java | 30 - .../ScalingPlanPatchPropertiesTests.java | 144 -- .../generated/ScalingPlanPatchTests.java | 147 -- .../ScalingPlanPooledScheduleInnerTests.java | 91 - .../ScalingPlanPooledScheduleListTests.java | 102 - .../ScalingPlanPooledSchedulePatchTests.java | 91 - ...lingPlanPooledSchedulePropertiesTests.java | 92 - ...dSchedulesCreateWithResponseMockTests.java | 115 - ...dSchedulesDeleteWithResponseMockTests.java | 63 - ...oledSchedulesGetWithResponseMockTests.java | 95 - ...alingPlanPooledSchedulesListMockTests.java | 105 - .../generated/ScalingPlanPropertiesTests.java | 218 -- ...eByResourceGroupWithResponseMockTests.java | 63 - .../generated/ScalingScheduleTests.java | 95 - .../generated/SendMessageTests.java | 29 - .../generated/ServiceSpecificationTests.java | 46 - .../generated/SessionHostInnerTests.java | 63 - .../generated/SessionHostListTests.java | 69 - .../SessionHostPatchPropertiesTests.java | 35 - .../generated/SessionHostPatchTests.java | 33 - ...ssionHostsDeleteWithResponseMockTests.java | 63 - .../SessionHostsGetWithResponseMockTests.java | 82 - .../generated/SessionHostsListMockTests.java | 83 - ...ssionHostsUpdateWithResponseMockTests.java | 92 - .../generated/SkuTests.java | 43 - .../generated/StartMenuItemInnerTests.java | 42 - .../generated/StartMenuItemListTests.java | 48 - .../StartMenuItemPropertiesTests.java | 42 - .../StartMenuItemsListMockTests.java | 80 - .../generated/TimeTests.java | 26 - .../generated/UserSessionInnerTests.java | 45 - .../generated/UserSessionListTests.java | 63 - .../generated/UserSessionPropertiesTests.java | 45 - ...erSessionsDeleteWithResponseMockTests.java | 63 - ...ssionsDisconnectWithResponseMockTests.java | 63 - .../UserSessionsGetWithResponseMockTests.java | 77 - .../UserSessionsListByHostPoolMockTests.java | 83 - .../generated/UserSessionsListMockTests.java | 76 - ...sionsSendMessageWithResponseMockTests.java | 70 - .../WorkspacePatchPropertiesTests.java | 37 - .../generated/WorkspacePatchTests.java | 62 - .../generated/WorkspacePropertiesTests.java | 37 - ...eByResourceGroupWithResponseMockTests.java | 61 - 236 files changed, 13088 insertions(+), 6321 deletions(-) create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateEndpointConnectionsClient.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateLinkResourcesClient.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPersonalSchedulesClient.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateEndpointConnectionProperties.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateEndpointConnectionWithSystemDataInner.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateLinkResourceInner.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateLinkResourceProperties.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPersonalScheduleInner.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPersonalScheduleProperties.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionWithSystemDataImpl.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsClientImpl.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsImpl.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourceImpl.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesClientImpl.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesImpl.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalScheduleImpl.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesClientImpl.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesImpl.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostpoolPublicNetworkAccess.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpoint.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnection.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionListResultWithSystemData.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionProvisioningState.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionWithSystemData.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnections.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointServiceConnectionStatus.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResource.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResourceListResult.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResources.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkServiceConnectionState.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PublicNetworkAccess.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedule.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalScheduleList.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedulePatch.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedules.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHandlingOperation.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SetStartVMOnConnect.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartupBehavior.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolSamples.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceSamples.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolSamples.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceSamples.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolSamples.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceSamples.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolSamples.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceSamples.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolSamples.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceSamples.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesCreateSamples.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteSamples.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesGetSamples.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesListSamples.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesUpdateSamples.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePatchPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationInnerTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationListTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopInnerTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopListTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageInnerTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageListTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImagePropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/IdentityTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/LogSpecificationTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPatchPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImageUriTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageApplicationsTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageDependenciesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageInnerTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageListTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetIdentityTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetSkuTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationDisplayTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationInnerTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationListTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingHostPoolReferenceTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleInnerTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleListTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePatchTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingScheduleTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SendMessageTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ServiceSpecificationTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostInnerTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostListTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SkuTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemInnerTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemListTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/TimeTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionInnerTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionListTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageWithResponseMockTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchPropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePropertiesTests.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteByResourceGroupWithResponseMockTests.java diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md index f4a85ecf64558..94a4da8caf57f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2023-09-18) + +- 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 diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/README.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/README.md index d6ca4c7be8d2b..364f90f8f8933 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-beta.1 ``` [//]: # ({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 b084c5562c95f..02e1653efaada 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 7b97bdb575acd..03a23c34c58e4 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml @@ -18,7 +18,7 @@ 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 @@ -45,6 +45,7 @@ UTF-8 0 0 + true 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 2bc9fc7c2a4de..7f091bd81f2ab 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.0.0-beta.1"); 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 877f5e0a06fb4..8a128c96020dd 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 0000000000000..b0fe67f7c09fb --- /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 0000000000000..07b8dda0897c9 --- /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 0000000000000..011294d506d98 --- /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 da8dba500011f..c4f0c2085fdf2 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 e3d19f6baf5fb..d950f7dda4121 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 4973473feaaae..ddf0c382b5364 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 07a1c567f5979..ba3ef226255a5 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 04851ae8d7551..69441f3879f7a 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 b44d59b1c2994..1c5a76f63204c 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 0000000000000..38057b464ed54 --- /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 0000000000000..625ff47548f18 --- /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 0000000000000..bcbcdafc61baa --- /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 0000000000000..c6b1b9b130d03 --- /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 0000000000000..96c8a3393c45f --- /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 0000000000000..ef7679fe3be06 --- /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 37c0925810d7f..6af070c09a8fd 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 b92f1f55a6520..4ec700cac29a3 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 56641d158baea..aec93ac5b3cdc 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 5bb695f67ac46..b65a7681c1410 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 cd894795de880..e626cc117f2b4 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 d10c958adb3c5..d56062c1038ae 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 4327693dd73b2..c1f35897f130c 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 fab75fa0e9f41..fe4dac4abd987 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 0000000000000..56039e66e293a --- /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 0000000000000..af7c055d0ac69 --- /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 0000000000000..9c1e1c9a0ca7b --- /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 0000000000000..5719a5128e9ec --- /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 0000000000000..7900ce2c695b6 --- /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 0000000000000..bf1f3ace3c3af --- /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 0000000000000..61281fff0eebe --- /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 0000000000000..9003c60dcb0eb --- /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 0000000000000..2624a4702113a --- /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 40c3c915ac964..a8176e9298aed 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 c4065a3b7c510..56d9578bed4ff 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 a82821fda1012..5c8769c4ada65 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 61e0c0ad0f321..015db48e8ec1c 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 01c3b5324d2d9..2e2df0ffcb0be 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 275d159a93026..3732c02ff16fa 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 64e474a781726..e93b31ff77708 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 0000000000000..57801eb244891 --- /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 b156407a4abc2..e86c10a6d0e57 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 0000000000000..f05bf19fa1b74 --- /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 0000000000000..40f1ca1cd7b7d --- /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 0000000000000..482663f331fba --- /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 0000000000000..5df9c31ab572f --- /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 0000000000000..0ae6d5ef7e2ee --- /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 0000000000000..e2fad3ebdb734 --- /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 0000000000000..0dc90042b176e --- /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 0000000000000..33100e2656b90 --- /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 0000000000000..24165f968933b --- /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 0000000000000..c80034b42a097 --- /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 0000000000000..8c448bf0dcdd5 --- /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 0000000000000..40edec9b3e165 --- /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 f20d464d6df45..8077031ca64a6 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 0000000000000..7a899c03a48e0 --- /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 0000000000000..80e3f211b2c44 --- /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 0000000000000..1cac9608a949b --- /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 0000000000000..5c8b0790049a5 --- /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 9501a7780c9a3..9217dd0d945fb 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 0000000000000..17002258a15b4 --- /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 0000000000000..fc399b48546e2 --- /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 0000000000000..a26cd2b0b57f4 --- /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 c677cc2358adc..ed77248a82889 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 d988b3eebbb73..a2c2849e2ee50 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 7a36e5613a07d..bb81722644874 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 70c5ea3815036..60108384f45c2 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 07e3b0dbf61fe..bf74645cc6aca 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 e2130b177ad2e..f4860929fe988 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 80bc5356968a1..4be0ec5be229d 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 f81396d63e0ec..d947de84a4146 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 d89fd6612123b..9cb6306bac215 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 61810f9ccfffe..a08d501719e08 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 47a9dad938296..a5e9be9340d2d 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 dd402a3e014e8..0acf2a3e579d6 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 1870cdd81d783..ad21688194c51 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 3082294bcfba5..6ee3076ede979 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 228e4c898336d..76dd322caec73 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 a287f91e8aa3b..fd3ce680eb4d2 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 27e47d22b18f5..aebcc181e4f45 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 2235f17293259..777aaa57fb5d1 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 a74776e012657..8ab5ce0650e09 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 291ea6f0d3757..8f8a1916a901f 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 735e2ef67382c..e4edb9ceea557 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 1de75748b4bd6..516b1e4c3329c 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 8faa0a5d14223..171045fcfb64c 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 1f1580af81674..08e32074dcc87 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 f27a689b3bc01..7eb05104702e0 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 6740f8f1cda2d..3535f5d6c93dc 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 2c51759c920c0..d74c26d6d2887 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 fcdd0a2a98eb5..f45e7e5ede6c6 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 fa1146c8d460c..671bd72e6eb44 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 6d10d184fe91e..28b0226815ccf 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 0000000000000..e32cfef70403f --- /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 0000000000000..69f4b8e0ed9e0 --- /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 0000000000000..e48da89af70aa --- /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 0000000000000..8f3e3d4ff540e --- /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 0000000000000..58ed915c64e57 --- /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 0000000000000..271e032f9c9a4 --- /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 0000000000000..309d8ccbcd6a3 --- /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 0000000000000..7e351104dba28 --- /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 0000000000000..b7d07c4ea0300 --- /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 0000000000000..8dc18d338f9cf --- /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 0000000000000..237dee12c6097 --- /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 0000000000000..0c88ba2659bab --- /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 0000000000000..1839d2b7d1e1b --- /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 0000000000000..3daaa366ec746 --- /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 0000000000000..a89a76ee5c55b --- /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 ff2ce65425727..57ba8cf561fff 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 898435dd9654c..73c7fe42a09de 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 6f84a2b549e68..c709d61020888 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 abf613205fb85..695c3fb9c5bba 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 51d238daf9d12..f9d99313f570a 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 874de8aea6cfd..a6b224a2857f9 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 2574d3b1a3c8b..a32071be0baca 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 b73f65f802430..fcb015cb26c05 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 78163b31a73d9..0a6e860ab3b64 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 971c5a6e5bcd3..c8e8b6ddc8e33 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 16ec4d7f442b4..5f37f255b8d4d 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 cf4a3370137e4..40f559c3dd7a8 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 146c797130943..dd743a3e0a72d 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 f57d9a2dd0c20..9357f442e9910 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 24348df1abe31..a173fc7631fbe 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 7c3630219a7ed..94607d6a7c129 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 0204984d67e1e..aac9de967e81a 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 c0b857c3b6367..b6d8cb96e044c 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 274ca21bd3dfa..d8ca961dd9af5 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 1f33a5f72bda6..063dcb23c53c9 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 cf06a9b68bb12..743af23644664 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 ec22025963b8f..b1ad5dc1c6717 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 413a075ad1ad9..1927a382d8f17 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 1c396aa30454e..d00760de9e64f 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 b05e8dc3c4904..6e94a24b977d6 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 582b3f22d8636..0d4bb1ef6d29a 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 a86c72cbb7bc2..e19d221230521 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 cc16f8de6bdc7..b319baabb4c36 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 d5d6925f440eb..24be100cd8497 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 deleted file mode 100644 index cfbd9449fb73f..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePatchPropertiesTests.java +++ /dev/null @@ -1,54 +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.models.AgentUpdatePatchProperties; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowPatchProperties; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostComponentUpdateType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AgentUpdatePatchPropertiesTests { - @org.junit.jupiter.api.Test - 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\"}]}") - .toObject(AgentUpdatePatchProperties.class); - Assertions.assertEquals(SessionHostComponentUpdateType.DEFAULT, model.type()); - Assertions.assertEquals(false, model.useSessionHostLocalTime()); - Assertions.assertEquals("ocmbqfqvmkcxoza", model.maintenanceWindowTimeZone()); - Assertions.assertEquals(2066979028, model.maintenanceWindows().get(0).hour()); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.maintenanceWindows().get(0).dayOfWeek()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AgentUpdatePatchProperties model = - new AgentUpdatePatchProperties() - .withType(SessionHostComponentUpdateType.DEFAULT) - .withUseSessionHostLocalTime(false) - .withMaintenanceWindowTimeZone("ocmbqfqvmkcxoza") - .withMaintenanceWindows( - Arrays - .asList( - new MaintenanceWindowPatchProperties() - .withHour(2066979028) - .withDayOfWeek(DayOfWeek.THURSDAY), - new MaintenanceWindowPatchProperties().withHour(1663002651).withDayOfWeek(DayOfWeek.FRIDAY), - new MaintenanceWindowPatchProperties() - .withHour(1689859600) - .withDayOfWeek(DayOfWeek.TUESDAY))); - model = BinaryData.fromObject(model).toObject(AgentUpdatePatchProperties.class); - Assertions.assertEquals(SessionHostComponentUpdateType.DEFAULT, model.type()); - Assertions.assertEquals(false, model.useSessionHostLocalTime()); - Assertions.assertEquals("ocmbqfqvmkcxoza", model.maintenanceWindowTimeZone()); - Assertions.assertEquals(2066979028, 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 deleted file mode 100644 index 16927749969c6..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePropertiesTests.java +++ /dev/null @@ -1,50 +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.models.AgentUpdateProperties; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowProperties; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostComponentUpdateType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AgentUpdatePropertiesTests { - @org.junit.jupiter.api.Test - 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\"}]}") - .toObject(AgentUpdateProperties.class); - Assertions.assertEquals(SessionHostComponentUpdateType.DEFAULT, 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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AgentUpdateProperties model = - new AgentUpdateProperties() - .withType(SessionHostComponentUpdateType.DEFAULT) - .withUseSessionHostLocalTime(true) - .withMaintenanceWindowTimeZone("railvpnppfuf") - .withMaintenanceWindows( - Arrays - .asList( - new MaintenanceWindowProperties().withHour(395833055).withDayOfWeek(DayOfWeek.FRIDAY), - new MaintenanceWindowProperties().withHour(1444401866).withDayOfWeek(DayOfWeek.FRIDAY), - new MaintenanceWindowProperties().withHour(1095036678).withDayOfWeek(DayOfWeek.SUNDAY))); - model = BinaryData.fromObject(model).toObject(AgentUpdateProperties.class); - Assertions.assertEquals(SessionHostComponentUpdateType.DEFAULT, 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()); - } -} 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 deleted file mode 100644 index 582cc7d94a46f..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchPropertiesTests.java +++ /dev/null @@ -1,30 +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.ApplicationGroupPatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationGroupPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationGroupPatchProperties model = - BinaryData - .fromString("{\"description\":\"hvgyuguosvmk\",\"friendlyName\":\"sxqu\"}") - .toObject(ApplicationGroupPatchProperties.class); - Assertions.assertEquals("hvgyuguosvmk", model.description()); - Assertions.assertEquals("sxqu", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationGroupPatchProperties model = - new ApplicationGroupPatchProperties().withDescription("hvgyuguosvmk").withFriendlyName("sxqu"); - model = BinaryData.fromObject(model).toObject(ApplicationGroupPatchProperties.class); - Assertions.assertEquals("hvgyuguosvmk", model.description()); - Assertions.assertEquals("sxqu", model.friendlyName()); - } -} 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 deleted file mode 100644 index 30e734deeae97..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchTests.java +++ /dev/null @@ -1,49 +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.models.ApplicationGroupPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationGroupPatchTests { - @org.junit.jupiter.api.Test - 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\"}") - .toObject(ApplicationGroupPatch.class); - Assertions.assertEquals("biexzfeyu", model.tags().get("axibxujw")); - Assertions.assertEquals("wz", model.description()); - Assertions.assertEquals("dbpgnxytxhp", model.friendlyName()); - } - - @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"); - model = BinaryData.fromObject(model).toObject(ApplicationGroupPatch.class); - Assertions.assertEquals("biexzfeyu", model.tags().get("axibxujw")); - Assertions.assertEquals("wz", model.description()); - Assertions.assertEquals("dbpgnxytxhp", model.friendlyName()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} 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 deleted file mode 100644 index aac23f36140b4..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPropertiesTests.java +++ /dev/null @@ -1,40 +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.ApplicationGroupProperties; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupType; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationGroupPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationGroupProperties model = - BinaryData - .fromString( - "{\"objectId\":\"lqidyby\",\"description\":\"zfcl\",\"friendlyName\":\"axdbabph\",\"hostPoolArmPath\":\"wrqlfktsthsuco\",\"workspaceArmPath\":\"nyyazttbtwwrqpue\",\"applicationGroupType\":\"Desktop\",\"cloudPcResource\":false}") - .toObject(ApplicationGroupProperties.class); - Assertions.assertEquals("zfcl", model.description()); - Assertions.assertEquals("axdbabph", model.friendlyName()); - Assertions.assertEquals("wrqlfktsthsuco", model.hostPoolArmPath()); - Assertions.assertEquals(ApplicationGroupType.DESKTOP, model.applicationGroupType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationGroupProperties model = - new ApplicationGroupProperties() - .withDescription("zfcl") - .withFriendlyName("axdbabph") - .withHostPoolArmPath("wrqlfktsthsuco") - .withApplicationGroupType(ApplicationGroupType.DESKTOP); - 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()); - } -} 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 deleted file mode 100644 index 4b8ae2b8f4d3d..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,61 +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.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 ApplicationGroupsDeleteByResourceGroupWithResponseMockTests { - @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.applicationGroups().deleteByResourceGroupWithResponse("u", "rj", 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 deleted file mode 100644 index 273c6c8d86439..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationInnerTests.java +++ /dev/null @@ -1,62 +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.ApplicationInner; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationInnerTests { - @org.junit.jupiter.api.Test - 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\"}") - .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(RemoteApplicationType.IN_BUILT, model.applicationType()); - Assertions.assertEquals(CommandLineSetting.ALLOW, model.commandLineSetting()); - Assertions.assertEquals("wgqwgxhn", model.commandLineArguments()); - Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("fbkp", model.iconPath()); - Assertions.assertEquals(1098465372, 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") - .withApplicationType(RemoteApplicationType.IN_BUILT) - .withCommandLineSetting(CommandLineSetting.ALLOW) - .withCommandLineArguments("wgqwgxhn") - .withShowInPortal(true) - .withIconPath("fbkp") - .withIconIndex(1098465372); - 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(RemoteApplicationType.IN_BUILT, model.applicationType()); - Assertions.assertEquals(CommandLineSetting.ALLOW, model.commandLineSetting()); - Assertions.assertEquals("wgqwgxhn", model.commandLineArguments()); - Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("fbkp", model.iconPath()); - Assertions.assertEquals(1098465372, 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 deleted file mode 100644 index 034d8a292d386..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationListTests.java +++ /dev/null @@ -1,92 +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.ApplicationInner; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationList; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationListTests { - @org.junit.jupiter.api.Test - 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\"}") - .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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationList model = - new ApplicationList() - .withValue( - 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), - new ApplicationInner() - .withDescription("rcfbunrm") - .withFriendlyName("jhhkxbp") - .withFilePath("ymjhxxjyngudivkr") - .withMsixPackageFamilyName("wbxqzvszjfau") - .withMsixPackageApplicationId("fdxxivetvtcqaqtd") - .withApplicationType(RemoteApplicationType.MSIX_APPLICATION) - .withCommandLineSetting(CommandLineSetting.ALLOW) - .withCommandLineArguments("xv") - .withShowInPortal(false) - .withIconPath("slqb") - .withIconIndex(92665469), - new ApplicationInner() - .withDescription("ruvw") - .withFriendlyName("sqfsubcgjbirxb") - .withFilePath("bsrfbj") - .withMsixPackageFamilyName("twss") - .withMsixPackageApplicationId("ftpvjzbexil") - .withApplicationType(RemoteApplicationType.IN_BUILT) - .withCommandLineSetting(CommandLineSetting.DO_NOT_ALLOW) - .withCommandLineArguments("q") - .withShowInPortal(false) - .withIconPath("mqtaruoujmkcjh") - .withIconIndex(1420775781))); - 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()); - } -} 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 deleted file mode 100644 index 3542b0c31711a..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchPropertiesTests.java +++ /dev/null @@ -1,62 +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.ApplicationPatchProperties; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationPatchPropertiesTests { - @org.junit.jupiter.api.Test - 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\"}") - .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(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()); - } - - @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") - .withShowInPortal(true) - .withIconPath("jixisxyawjoyaqcs") - .withIconIndex(2113030944) - .withMsixPackageFamilyName("kiidzyex") - .withMsixPackageApplicationId("eli") - .withApplicationType(RemoteApplicationType.IN_BUILT); - 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(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()); - } -} 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 deleted file mode 100644 index e86733c9138ab..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchTests.java +++ /dev/null @@ -1,78 +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.models.ApplicationPatch; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationPatchTests { - @org.junit.jupiter.api.Test - 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\"}}") - .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()); - } - - @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); - 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()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} 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 deleted file mode 100644 index 82b9dd7d916d9..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPropertiesTests.java +++ /dev/null @@ -1,62 +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.ApplicationProperties; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationPropertiesTests { - @org.junit.jupiter.api.Test - 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\"}") - .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(RemoteApplicationType.IN_BUILT, model.applicationType()); - Assertions.assertEquals(CommandLineSetting.REQUIRE, model.commandLineSetting()); - Assertions.assertEquals("ngmtsavjcb", model.commandLineArguments()); - Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("p", model.iconPath()); - Assertions.assertEquals(597886702, 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") - .withApplicationType(RemoteApplicationType.IN_BUILT) - .withCommandLineSetting(CommandLineSetting.REQUIRE) - .withCommandLineArguments("ngmtsavjcb") - .withShowInPortal(true) - .withIconPath("p") - .withIconIndex(597886702); - 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(RemoteApplicationType.IN_BUILT, model.applicationType()); - Assertions.assertEquals(CommandLineSetting.REQUIRE, model.commandLineSetting()); - Assertions.assertEquals("ngmtsavjcb", model.commandLineArguments()); - Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("p", model.iconPath()); - Assertions.assertEquals(597886702, 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 deleted file mode 100644 index 00b7488b3a0a9..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,94 +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.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.Application; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -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 ApplicationsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - 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\"}"; - - 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)); - - 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") - .withShowInPortal(true) - .withIconPath("lj") - .withIconIndex(2075017284) - .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(RemoteApplicationType.MSIX_APPLICATION, response.applicationType()); - Assertions.assertEquals(CommandLineSetting.DO_NOT_ALLOW, response.commandLineSetting()); - Assertions.assertEquals("jeuut", response.commandLineArguments()); - Assertions.assertEquals(false, response.showInPortal()); - Assertions.assertEquals("z", response.iconPath()); - Assertions.assertEquals(2023455303, 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 deleted file mode 100644 index c7bfc5ed64a74..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteWithResponseMockTests.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.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 ApplicationsDeleteWithResponseMockTests { - @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 - .applications() - .deleteWithResponse("jsqzhzbezk", "imsidxasicddyvvj", "kgfmocwahpq", 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 deleted file mode 100644 index 52c74690589aa..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetWithResponseMockTests.java +++ /dev/null @@ -1,82 +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.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.Application; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -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 ApplicationsGetWithResponseMockTests { - @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\":{\"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\"}"; - - 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)); - - Application response = - manager - .applications() - .getWithResponse("nygq", "nfwqzdzgtilaxhn", "hqlyvijo", 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(RemoteApplicationType.IN_BUILT, response.applicationType()); - Assertions.assertEquals(CommandLineSetting.ALLOW, response.commandLineSetting()); - Assertions.assertEquals("mmbnpqfrtql", response.commandLineArguments()); - Assertions.assertEquals(false, response.showInPortal()); - Assertions.assertEquals("gnitgvkxlzyq", response.iconPath()); - Assertions.assertEquals(1463810851, 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 deleted file mode 100644 index fff6bab9968e8..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListMockTests.java +++ /dev/null @@ -1,82 +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.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.Application; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -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 ApplicationsListMockTests { - @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\":{\"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\"}]}"; - - 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 - .applications() - .list("atjeaahh", "jhhn", 919840845, false, 1060180082, 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(true, response.iterator().next().showInPortal()); - Assertions.assertEquals("iekkkzddrtkgdojb", response.iterator().next().iconPath()); - Assertions.assertEquals(494588403, 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 deleted file mode 100644 index ac3593868df6f..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopInnerTests.java +++ /dev/null @@ -1,30 +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.DesktopInner; -import org.junit.jupiter.api.Assertions; - -public final class DesktopInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DesktopInner model = - BinaryData - .fromString( - "{\"properties\":{\"objectId\":\"qig\",\"description\":\"duhavhqlkt\",\"friendlyName\":\"maqolbgycduie\",\"iconHash\":\"gccymvaolpssl\"},\"id\":\"fmmdnbbg\",\"name\":\"zpswiydmc\",\"type\":\"yhz\"}") - .toObject(DesktopInner.class); - Assertions.assertEquals("duhavhqlkt", model.description()); - Assertions.assertEquals("maqolbgycduie", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DesktopInner model = new DesktopInner().withDescription("duhavhqlkt").withFriendlyName("maqolbgycduie"); - model = BinaryData.fromObject(model).toObject(DesktopInner.class); - Assertions.assertEquals("duhavhqlkt", model.description()); - Assertions.assertEquals("maqolbgycduie", 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 deleted file mode 100644 index b9a0b8ee49fc9..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopListTests.java +++ /dev/null @@ -1,37 +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.DesktopInner; -import com.azure.resourcemanager.desktopvirtualization.models.DesktopList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DesktopListTests { - @org.junit.jupiter.api.Test - 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\"}") - .toObject(DesktopList.class); - Assertions.assertEquals("ibqdxbxwakbogqx", model.value().get(0).description()); - Assertions.assertEquals("lkzgxhuriplbp", model.value().get(0).friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DesktopList model = - new DesktopList() - .withValue( - Arrays - .asList( - new DesktopInner().withDescription("ibqdxbxwakbogqx").withFriendlyName("lkzgxhuriplbp"))); - model = BinaryData.fromObject(model).toObject(DesktopList.class); - Assertions.assertEquals("ibqdxbxwakbogqx", model.value().get(0).description()); - Assertions.assertEquals("lkzgxhuriplbp", 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 deleted file mode 100644 index 337b01488894e..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchPropertiesTests.java +++ /dev/null @@ -1,30 +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.DesktopPatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class DesktopPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DesktopPatchProperties model = - BinaryData - .fromString("{\"description\":\"ikvmkqzeqqk\",\"friendlyName\":\"tfz\"}") - .toObject(DesktopPatchProperties.class); - Assertions.assertEquals("ikvmkqzeqqk", model.description()); - Assertions.assertEquals("tfz", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DesktopPatchProperties model = - new DesktopPatchProperties().withDescription("ikvmkqzeqqk").withFriendlyName("tfz"); - model = BinaryData.fromObject(model).toObject(DesktopPatchProperties.class); - Assertions.assertEquals("ikvmkqzeqqk", model.description()); - Assertions.assertEquals("tfz", 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 deleted file mode 100644 index 9ae646a0efdc4..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchTests.java +++ /dev/null @@ -1,58 +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.models.DesktopPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DesktopPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DesktopPatch model = - BinaryData - .fromString( - "{\"tags\":{\"erscdntne\":\"dzu\",\"tmweriofzpyq\":\"fiwjmygtdssls\",\"hhszh\":\"emwabnet\",\"lvwiwubmwmbesl\":\"d\"},\"properties\":{\"description\":\"wwtppj\",\"friendlyName\":\"cxogaokonzm\"}}") - .toObject(DesktopPatch.class); - Assertions.assertEquals("dzu", model.tags().get("erscdntne")); - Assertions.assertEquals("wwtppj", model.description()); - Assertions.assertEquals("cxogaokonzm", 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"); - model = BinaryData.fromObject(model).toObject(DesktopPatch.class); - Assertions.assertEquals("dzu", model.tags().get("erscdntne")); - Assertions.assertEquals("wwtppj", model.description()); - Assertions.assertEquals("cxogaokonzm", model.friendlyName()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} 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 deleted file mode 100644 index 62742f59b6d06..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPropertiesTests.java +++ /dev/null @@ -1,31 +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.DesktopProperties; -import org.junit.jupiter.api.Assertions; - -public final class DesktopPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DesktopProperties model = - BinaryData - .fromString( - "{\"objectId\":\"ss\",\"description\":\"bzmnvdfznud\",\"friendlyName\":\"dvxzbncblylpst\",\"iconHash\":\"hh\"}") - .toObject(DesktopProperties.class); - Assertions.assertEquals("bzmnvdfznud", model.description()); - Assertions.assertEquals("dvxzbncblylpst", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DesktopProperties model = - new DesktopProperties().withDescription("bzmnvdfznud").withFriendlyName("dvxzbncblylpst"); - model = BinaryData.fromObject(model).toObject(DesktopProperties.class); - Assertions.assertEquals("bzmnvdfznud", model.description()); - Assertions.assertEquals("dvxzbncblylpst", 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 deleted file mode 100644 index cb289ab356cdb..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetWithResponseMockTests.java +++ /dev/null @@ -1,71 +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.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.Desktop; -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 DesktopsGetWithResponseMockTests { - @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\":{\"objectId\":\"iqtgdqoh\",\"description\":\"wsldrizetpwbr\",\"friendlyName\":\"llibphbqzmizak\",\"iconHash\":\"ankjpdnjzh\"},\"id\":\"oylhjlmuoyxprimr\",\"name\":\"opteecj\",\"type\":\"eislstvasylwx\"}"; - - 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)); - - Desktop response = - manager - .desktops() - .getWithResponse("eafidltugsresm", "ssjhoiftxfkf", "egprhptil", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wsldrizetpwbr", response.description()); - Assertions.assertEquals("llibphbqzmizak", 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 deleted file mode 100644 index b22a74cb22b1a..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListMockTests.java +++ /dev/null @@ -1,71 +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.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.Desktop; -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 DesktopsListMockTests { - @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\":{\"objectId\":\"khgn\",\"description\":\"zonzlrpiqywnc\",\"friendlyName\":\"tszcofizehtdhgb\",\"iconHash\":\"vreljea\"},\"id\":\"rvzmlovuana\",\"name\":\"hcxlpm\",\"type\":\"erbdk\"}]}"; - - 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 - .desktops() - .list("hcz", "xrxzbujrtr", 1272649211, true, 1247179302, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zonzlrpiqywnc", response.iterator().next().description()); - Assertions.assertEquals("tszcofizehtdhgb", 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 deleted file mode 100644 index c1f1b8ca59da7..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateWithResponseMockTests.java +++ /dev/null @@ -1,94 +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.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.Desktop; -import com.azure.resourcemanager.desktopvirtualization.models.DesktopPatch; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -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 DesktopsUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"objectId\":\"bpmzzn\",\"description\":\"ff\",\"friendlyName\":\"qitmhheioqaqhv\",\"iconHash\":\"ufuqyrx\"},\"id\":\"lcgqlsismj\",\"name\":\"frddgamquhiosrsj\",\"type\":\"ivfcdisyirnx\"}"; - - 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)); - - Desktop response = - manager - .desktops() - .updateWithResponse( - "zaum", - "eoohguufuzboyj", - "thwtzol", - new DesktopPatch() - .withTags( - mapOf("lxveabfqx", "mwmdxmebwjscjpa", "ijddtvqc", "mwmqtibx", "jaeukmrsieekpn", "tad")) - .withDescription("apm") - .withFriendlyName("qmeqwigpibudqwyx"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ff", response.description()); - Assertions.assertEquals("qitmhheioqaqhv", response.friendlyName()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} 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 deleted file mode 100644 index 3f6e10861d4d9..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageInnerTests.java +++ /dev/null @@ -1,116 +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.ExpandMsixImageInner; -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; - -public final class ExpandMsixImageInnerTests { - @org.junit.jupiter.api.Test - 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\"}") - .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(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()); - } - - @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) - .withIsActive(true) - .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("ex") - .withPublisher("wueluqhhahhxv") - .withMinVersion("mzkwpjg"), - new MsixPackageDependencies() - .withDependencyName("spughftqsxhq") - .withPublisher("j") - .withMinVersion("kndxdigrjgu"), - new MsixPackageDependencies() - .withDependencyName("zdmsyqtfi") - .withPublisher("hbotzingamvppho") - .withMinVersion("qzudphq"))) - .withVersion("vdkfwynwcvtbvk") - .withLastUpdated(OffsetDateTime.parse("2021-01-08T18:46:20Z")) - .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"))); - 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(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()); - } -} 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 deleted file mode 100644 index 678cea729932a..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageListTests.java +++ /dev/null @@ -1,83 +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.ExpandMsixImageInner; -import com.azure.resourcemanager.desktopvirtualization.models.ExpandMsixImageList; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExpandMsixImageListTests { - @org.junit.jupiter.api.Test - 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\"}") - .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(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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExpandMsixImageList model = - new ExpandMsixImageList() - .withValue( - Arrays - .asList( - new ExpandMsixImageInner() - .withPackageAlias("dbodacizsjqlhkrr") - .withImagePath("deibqip") - .withPackageName("ghvxndzwmkrefa") - .withPackageFamilyName("jorwkqnyhgbij") - .withPackageFullName("ivfxzsjabibsyst") - .withDisplayName("fsdjpvkvp") - .withPackageRelativePath("xbkzbzkdvncj") - .withIsRegularRegistration(true) - .withIsActive(true) - .withPackageDependencies(Arrays.asList()) - .withVersion("kakmokzh") - .withLastUpdated(OffsetDateTime.parse("2021-06-24T09:54:49Z")) - .withPackageApplications(Arrays.asList()), - new ExpandMsixImageInner() - .withPackageAlias("vtldgmfpgvmpip") - .withImagePath("ltha") - .withPackageName("x") - .withPackageFamilyName("mwutwbdsre") - .withPackageFullName("drhneuyow") - .withDisplayName("d") - .withPackageRelativePath("t") - .withIsRegularRegistration(false) - .withIsActive(true) - .withPackageDependencies(Arrays.asList()) - .withVersion("gpikpzimejza") - .withLastUpdated(OffsetDateTime.parse("2021-08-16T12:50:07Z")) - .withPackageApplications(Arrays.asList()))); - 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(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()); - } -} 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 deleted file mode 100644 index 2682a6662ef03..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImagePropertiesTests.java +++ /dev/null @@ -1,110 +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.ExpandMsixImageProperties; -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; - -public final class ExpandMsixImagePropertiesTests { - @org.junit.jupiter.api.Test - 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\"}]}") - .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()); - } - - @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) - .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("l") - .withPublisher("ngitvgbmhrixkwm") - .withMinVersion("jejveg"), - new MsixPackageDependencies() - .withDependencyName("bpnaixexccbdre") - .withPublisher("hcexdrrvqa") - .withMinVersion("kghtpwijnh"), - new MsixPackageDependencies() - .withDependencyName("svfycxzbfv") - .withPublisher("wvrvmtg") - .withMinVersion("ppyostronzmyhgf"))) - .withVersion("nsxkmcwaekrrjr") - .withLastUpdated(OffsetDateTime.parse("2021-03-26T11:48:46Z")) - .withPackageApplications( - Arrays - .asList( - new MsixPackageApplications() - .withAppId("gumhjglikkxws") - .withDescription("lbqpvuzlmvfelf") - .withAppUserModelId("gplcrpwjxeznoigb") - .withFriendlyName("jwmwkpnbs") - .withIconImageName("ejjoqkagfhsxtta"), - new MsixPackageApplications() - .withAppId("nfaazpxdtnkdmkq") - .withDescription("lwuenvrkp") - .withAppUserModelId("uaibrebqaaysj") - .withFriendlyName("xqtnq") - .withIconImageName("ezl"))); - 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()); - } -} 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 deleted file mode 100644 index 3a794a58bd881..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteWithResponseMockTests.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.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 HostPoolsDeleteWithResponseMockTests { - @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 - .hostPools() - .deleteWithResponse("belawumuaslzkwr", "woycqucwyha", 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 deleted file mode 100644 index 65f3dcaa6bedb..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/IdentityTests.java +++ /dev/null @@ -1,28 +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.models.Identity; -import com.azure.resourcemanager.desktopvirtualization.models.ResourceIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class IdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Identity model = - BinaryData - .fromString("{\"principalId\":\"w\",\"tenantId\":\"lryplwckbasyy\",\"type\":\"SystemAssigned\"}") - .toObject(Identity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Identity model = new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED); - model = BinaryData.fromObject(model).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 deleted file mode 100644 index eed2ef4f6a665..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/LogSpecificationTests.java +++ /dev/null @@ -1,36 +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.models.LogSpecification; -import org.junit.jupiter.api.Assertions; - -public final class LogSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogSpecification model = - BinaryData - .fromString( - "{\"name\":\"wmfdatscmdvpjhul\",\"displayName\":\"uvm\",\"blobDuration\":\"ozkrwfndiodjpslw\"}") - .toObject(LogSpecification.class); - Assertions.assertEquals("wmfdatscmdvpjhul", model.name()); - Assertions.assertEquals("uvm", model.displayName()); - Assertions.assertEquals("ozkrwfndiodjpslw", model.blobDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogSpecification model = - new LogSpecification() - .withName("wmfdatscmdvpjhul") - .withDisplayName("uvm") - .withBlobDuration("ozkrwfndiodjpslw"); - model = BinaryData.fromObject(model).toObject(LogSpecification.class); - Assertions.assertEquals("wmfdatscmdvpjhul", model.name()); - Assertions.assertEquals("uvm", model.displayName()); - Assertions.assertEquals("ozkrwfndiodjpslw", 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 deleted file mode 100644 index eae1f0f8ea010..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPatchPropertiesTests.java +++ /dev/null @@ -1,31 +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.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowPatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class MaintenanceWindowPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceWindowPatchProperties model = - BinaryData - .fromString("{\"hour\":1586709440,\"dayOfWeek\":\"Tuesday\"}") - .toObject(MaintenanceWindowPatchProperties.class); - Assertions.assertEquals(1586709440, model.hour()); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.dayOfWeek()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceWindowPatchProperties model = - new MaintenanceWindowPatchProperties().withHour(1586709440).withDayOfWeek(DayOfWeek.TUESDAY); - model = BinaryData.fromObject(model).toObject(MaintenanceWindowPatchProperties.class); - Assertions.assertEquals(1586709440, model.hour()); - Assertions.assertEquals(DayOfWeek.TUESDAY, 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 deleted file mode 100644 index 8f3e49e8e82db..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPropertiesTests.java +++ /dev/null @@ -1,31 +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.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowProperties; -import org.junit.jupiter.api.Assertions; - -public final class MaintenanceWindowPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceWindowProperties model = - BinaryData - .fromString("{\"hour\":1591764317,\"dayOfWeek\":\"Sunday\"}") - .toObject(MaintenanceWindowProperties.class); - Assertions.assertEquals(1591764317, model.hour()); - Assertions.assertEquals(DayOfWeek.SUNDAY, model.dayOfWeek()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceWindowProperties model = - new MaintenanceWindowProperties().withHour(1591764317).withDayOfWeek(DayOfWeek.SUNDAY); - model = BinaryData.fromObject(model).toObject(MaintenanceWindowProperties.class); - Assertions.assertEquals(1591764317, model.hour()); - Assertions.assertEquals(DayOfWeek.SUNDAY, 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 deleted file mode 100644 index 52c9b7c768abd..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImageUriTests.java +++ /dev/null @@ -1,24 +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.models.MsixImageUri; -import org.junit.jupiter.api.Assertions; - -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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixImageUri model = new MsixImageUri().withUri("nyowxwlmdjrkvfg"); - model = BinaryData.fromObject(model).toObject(MsixImageUri.class); - Assertions.assertEquals("nyowxwlmdjrkvfg", 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 deleted file mode 100644 index ecf9afc972659..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandMockTests.java +++ /dev/null @@ -1,81 +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.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.ExpandMsixImage; -import com.azure.resourcemanager.desktopvirtualization.models.MsixImageUri; -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 MsixImagesExpandMockTests { - @Test - public void testExpand() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - 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\"}]}"; - - 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 - .msixImages() - .expand("vefloccsrmozihmi", "g", new MsixImageUri().withUri("txx"), 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(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()); - } -} 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 deleted file mode 100644 index 05538f6e5784b..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageApplicationsTests.java +++ /dev/null @@ -1,42 +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.models.MsixPackageApplications; -import org.junit.jupiter.api.Assertions; - -public final class MsixPackageApplicationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MsixPackageApplications model = - BinaryData - .fromString( - "{\"appId\":\"yylhalnswhccsp\",\"description\":\"aivwitqscywu\",\"appUserModelID\":\"woluhczbwemhair\",\"friendlyName\":\"rgzdwmsweyp\",\"iconImageName\":\"dxggicccnxqhuexm\"}") - .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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixPackageApplications model = - new MsixPackageApplications() - .withAppId("yylhalnswhccsp") - .withDescription("aivwitqscywu") - .withAppUserModelId("woluhczbwemhair") - .withFriendlyName("rgzdwmsweyp") - .withIconImageName("dxggicccnxqhuexm"); - 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()); - } -} 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 deleted file mode 100644 index 26aef8890ed85..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageDependenciesTests.java +++ /dev/null @@ -1,35 +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.models.MsixPackageDependencies; -import org.junit.jupiter.api.Assertions; - -public final class MsixPackageDependenciesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MsixPackageDependencies model = - BinaryData - .fromString("{\"dependencyName\":\"zqhof\",\"publisher\":\"maequiahxicslfa\",\"minVersion\":\"z\"}") - .toObject(MsixPackageDependencies.class); - Assertions.assertEquals("zqhof", model.dependencyName()); - Assertions.assertEquals("maequiahxicslfa", model.publisher()); - Assertions.assertEquals("z", model.minVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixPackageDependencies model = - new MsixPackageDependencies() - .withDependencyName("zqhof") - .withPublisher("maequiahxicslfa") - .withMinVersion("z"); - model = BinaryData.fromObject(model).toObject(MsixPackageDependencies.class); - Assertions.assertEquals("zqhof", model.dependencyName()); - Assertions.assertEquals("maequiahxicslfa", model.publisher()); - Assertions.assertEquals("z", 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 deleted file mode 100644 index ef6d02c1e3c80..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageInnerTests.java +++ /dev/null @@ -1,102 +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.MsixPackageInner; -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; - -public final class MsixPackageInnerTests { - @org.junit.jupiter.api.Test - 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\"}") - .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()); - } - - @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) - .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("ebwnujhe") - .withPublisher("sbvdkcrodtjinfw") - .withMinVersion("fltkacjv"))) - .withVersion("kdlfoa") - .withLastUpdated(OffsetDateTime.parse("2020-12-29T16:57:58Z")) - .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"), - new MsixPackageApplications() - .withAppId("dbnw") - .withDescription("fhucqdpfuv") - .withAppUserModelId("sbjjc") - .withFriendlyName("vxb") - .withIconImageName("vudutncor"))); - 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()); - } -} 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 deleted file mode 100644 index f03895ca40464..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageListTests.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.MsixPackageInner; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageList; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MsixPackageListTests { - @org.junit.jupiter.api.Test - 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\"}") - .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(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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixPackageList model = - new MsixPackageList() - .withValue( - Arrays - .asList( - new MsixPackageInner() - .withImagePath("r") - .withPackageName("vu") - .withPackageFamilyName("raehtwdwrft") - .withDisplayName("iby") - .withPackageRelativePath("dl") - .withIsRegularRegistration(true) - .withIsActive(true) - .withPackageDependencies(Arrays.asList()) - .withVersion("racstwity") - .withLastUpdated(OffsetDateTime.parse("2021-10-09T17:15:47Z")) - .withPackageApplications(Arrays.asList()))); - 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(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()); - } -} 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 deleted file mode 100644 index feeefc31a6427..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchPropertiesTests.java +++ /dev/null @@ -1,35 +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.MsixPackagePatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class MsixPackagePatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MsixPackagePatchProperties model = - BinaryData - .fromString("{\"isActive\":false,\"isRegularRegistration\":true,\"displayName\":\"pelol\"}") - .toObject(MsixPackagePatchProperties.class); - Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals("pelol", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixPackagePatchProperties model = - new MsixPackagePatchProperties() - .withIsActive(false) - .withIsRegularRegistration(true) - .withDisplayName("pelol"); - model = BinaryData.fromObject(model).toObject(MsixPackagePatchProperties.class); - Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals("pelol", 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 deleted file mode 100644 index 759ae02dc0ca2..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchTests.java +++ /dev/null @@ -1,33 +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.models.MsixPackagePatch; -import org.junit.jupiter.api.Assertions; - -public final class MsixPackagePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MsixPackagePatch model = - BinaryData - .fromString( - "{\"properties\":{\"isActive\":false,\"isRegularRegistration\":true,\"displayName\":\"ywemhzrn\"},\"id\":\"sdtclusiypbs\",\"name\":\"gytguslfead\",\"type\":\"ygqukyhejh\"}") - .toObject(MsixPackagePatch.class); - Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals("ywemhzrn", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixPackagePatch model = - new MsixPackagePatch().withIsActive(false).withIsRegularRegistration(true).withDisplayName("ywemhzrn"); - model = BinaryData.fromObject(model).toObject(MsixPackagePatch.class); - Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals("ywemhzrn", 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 deleted file mode 100644 index f1b4f63d4f39e..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePropertiesTests.java +++ /dev/null @@ -1,112 +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.MsixPackageProperties; -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; - -public final class MsixPackagePropertiesTests { - @org.junit.jupiter.api.Test - 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\"}]}") - .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(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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixPackageProperties model = - new MsixPackageProperties() - .withImagePath("bgdknnqv") - .withPackageName("znqntoru") - .withPackageFamilyName("gsahmkycgrauw") - .withDisplayName("etaebu") - .withPackageRelativePath("vdmovsmzlxwabm") - .withIsRegularRegistration(false) - .withIsActive(false) - .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("vtpuqujmqlgk") - .withPublisher("tndoaongbjc") - .withMinVersion("ujitcjedftww"), - new MsixPackageDependencies() - .withDependencyName("zkoj") - .withPublisher("c") - .withMinVersion("foqouicybx"))) - .withVersion("zg") - .withLastUpdated(OffsetDateTime.parse("2021-08-24T17:23:35Z")) - .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"))); - 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(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()); - } -} 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 deleted file mode 100644 index 2976999f760a5..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,91 +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.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.MsixPackage; -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 MsixPackagesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - 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\"}"; - - 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)); - - MsixPackage response = - manager - .msixPackages() - .define("xokffqyin") - .withExistingHostPool("jgehkf", "imrt") - .withImagePath("epqw") - .withPackageName("xmonstshi") - .withPackageFamilyName("gvelfc") - .withDisplayName("uccbirdsvuw") - .withPackageRelativePath("b") - .withIsRegularRegistration(true) - .withIsActive(false) - .withPackageDependencies(Arrays.asList()) - .withVersion("nwjizcilnghgshej") - .withLastUpdated(OffsetDateTime.parse("2021-06-09T08:55:37Z")) - .withPackageApplications(Arrays.asList()) - .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(false, response.isActive()); - Assertions.assertEquals("dsehaohdjhhflzo", response.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-28T18:31:03Z"), response.lastUpdated()); - } -} 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 deleted file mode 100644 index 40be326af70ed..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteWithResponseMockTests.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.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 MsixPackagesDeleteWithResponseMockTests { - @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 - .msixPackages() - .deleteWithResponse("crpfbcunez", "cez", "lfwyfwlwxjwetn", 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 deleted file mode 100644 index 2b16081adb85a..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetWithResponseMockTests.java +++ /dev/null @@ -1,78 +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.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.MsixPackage; -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 MsixPackagesGetWithResponseMockTests { - @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\":{\"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\"}"; - - 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)); - - MsixPackage response = - manager - .msixPackages() - .getWithResponse("uwfmduragegizvc", "felisdjub", "gbqi", 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(true, response.isRegularRegistration()); - Assertions.assertEquals(true, response.isActive()); - Assertions.assertEquals("xbcuiiznkt", response.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-02T08:34:37Z"), response.lastUpdated()); - } -} 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 deleted file mode 100644 index 3662d0b02af5f..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListMockTests.java +++ /dev/null @@ -1,78 +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.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.MsixPackage; -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 MsixPackagesListMockTests { - @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\":{\"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\"}]}"; - - 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 - .msixPackages() - .list("sihclafzvaylp", "rsqqwztcm", 544384144, false, 899185817, 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(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()); - } -} 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 deleted file mode 100644 index 723f8d3a95084..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationPropertiesTests.java +++ /dev/null @@ -1,54 +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.models.LogSpecification; -import com.azure.resourcemanager.desktopvirtualization.models.OperationProperties; -import com.azure.resourcemanager.desktopvirtualization.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationPropertiesTests { - @org.junit.jupiter.api.Test - 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\"}]}}") - .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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProperties model = - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .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")))); - 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()); - } -} 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 deleted file mode 100644 index 5950edc4bad0c..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListMockTests.java +++ /dev/null @@ -1,72 +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.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.ResourceProviderOperation; -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 OperationsListMockTests { - @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\":[{\"name\":\"eozphv\",\"display\":{\"provider\":\"y\",\"resource\":\"c\",\"operation\":\"upkvipmdsc\",\"description\":\"qupevzh\"},\"isDataAction\":true,\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[]}}}]}"; - - 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.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(true, response.iterator().next().isDataAction()); - } -} 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 deleted file mode 100644 index 344ca256dc19b..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetIdentityTests.java +++ /dev/null @@ -1,29 +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.models.ResourceIdentityType; -import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; -import org.junit.jupiter.api.Assertions; - -public final class ResourceModelWithAllowedPropertySetIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceModelWithAllowedPropertySetIdentity model = - BinaryData - .fromString("{\"principalId\":\"rokft\",\"tenantId\":\"olniwpwcukjf\",\"type\":\"SystemAssigned\"}") - .toObject(ResourceModelWithAllowedPropertySetIdentity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceModelWithAllowedPropertySetIdentity model = - new ResourceModelWithAllowedPropertySetIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED); - model = BinaryData.fromObject(model).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 deleted file mode 100644 index 336bd5471efa0..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetSkuTests.java +++ /dev/null @@ -1,43 +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.models.ResourceModelWithAllowedPropertySetSku; -import com.azure.resourcemanager.desktopvirtualization.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class ResourceModelWithAllowedPropertySetSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceModelWithAllowedPropertySetSku model = - BinaryData - .fromString( - "{\"name\":\"dhsgcba\",\"tier\":\"Standard\",\"size\":\"jkot\",\"family\":\"qgoulznd\",\"capacity\":708367520}") - .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()); - } - - @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); - 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()); - } -} 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 deleted file mode 100644 index 08355da328030..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationDisplayTests.java +++ /dev/null @@ -1,39 +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.models.ResourceProviderOperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderOperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderOperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"mparcryuanzw\",\"resource\":\"zdxtayrlhmwhf\",\"operation\":\"rqobmtuk\",\"description\":\"ryrtihfxtijbpzv\"}") - .toObject(ResourceProviderOperationDisplay.class); - Assertions.assertEquals("mparcryuanzw", model.provider()); - Assertions.assertEquals("zdxtayrlhmwhf", model.resource()); - Assertions.assertEquals("rqobmtuk", model.operation()); - Assertions.assertEquals("ryrtihfxtijbpzv", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderOperationDisplay model = - new ResourceProviderOperationDisplay() - .withProvider("mparcryuanzw") - .withResource("zdxtayrlhmwhf") - .withOperation("rqobmtuk") - .withDescription("ryrtihfxtijbpzv"); - 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()); - } -} 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 deleted file mode 100644 index ea39f8dd896fd..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationInnerTests.java +++ /dev/null @@ -1,54 +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.ResourceProviderOperationInner; -import com.azure.resourcemanager.desktopvirtualization.models.OperationProperties; -import com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationDisplay; -import com.azure.resourcemanager.desktopvirtualization.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderOperationInnerTests { - @org.junit.jupiter.api.Test - 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\":[]}}}") - .toObject(ResourceProviderOperationInner.class); - Assertions.assertEquals("jddeqsrdeupewnw", model.name()); - Assertions.assertEquals("tjzyflus", model.display().provider()); - Assertions.assertEquals("hmofc", model.display().resource()); - Assertions.assertEquals("smy", model.display().operation()); - Assertions.assertEquals("kdtmlxhekuk", model.display().description()); - Assertions.assertEquals(false, model.isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderOperationInner model = - new ResourceProviderOperationInner() - .withName("jddeqsrdeupewnw") - .withDisplay( - new ResourceProviderOperationDisplay() - .withProvider("tjzyflus") - .withResource("hmofc") - .withOperation("smy") - .withDescription("kdtmlxhekuk")) - .withIsDataAction(false) - .withProperties( - new OperationProperties() - .withServiceSpecification(new ServiceSpecification().withLogSpecifications(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(ResourceProviderOperationInner.class); - Assertions.assertEquals("jddeqsrdeupewnw", model.name()); - Assertions.assertEquals("tjzyflus", model.display().provider()); - Assertions.assertEquals("hmofc", model.display().resource()); - Assertions.assertEquals("smy", model.display().operation()); - Assertions.assertEquals("kdtmlxhekuk", model.display().description()); - Assertions.assertEquals(false, model.isDataAction()); - } -} 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 deleted file mode 100644 index 09ab5dfc573a9..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationListTests.java +++ /dev/null @@ -1,76 +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.ResourceProviderOperationInner; -import com.azure.resourcemanager.desktopvirtualization.models.OperationProperties; -import com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationDisplay; -import com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderOperationListTests { - @org.junit.jupiter.api.Test - 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\"}") - .toObject(ResourceProviderOperationList.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderOperationList model = - new ResourceProviderOperationList() - .withValue( - Arrays - .asList( - new ResourceProviderOperationInner() - .withName("quvgjxpybczme") - .withDisplay( - new ResourceProviderOperationDisplay() - .withProvider("zopbsphrupidgs") - .withResource("bejhphoycmsxa") - .withOperation("hdxbmtqio") - .withDescription("zehtbmu")) - .withIsDataAction(false) - .withProperties(new OperationProperties()), - new ResourceProviderOperationInner() - .withName("izhwlrxy") - .withDisplay( - new ResourceProviderOperationDisplay() - .withProvider("oqijgkdmbpaz") - .withResource("bc") - .withOperation("pdznrbtcqqjnqgl") - .withDescription("gnufoooj")) - .withIsDataAction(true) - .withProperties(new OperationProperties()), - new ResourceProviderOperationInner() - .withName("esaagdfm") - .withDisplay( - new ResourceProviderOperationDisplay() - .withProvider("lhjxr") - .withResource("kwm") - .withOperation("ktsizntocipaou") - .withDescription("psqucmpoyf")) - .withIsDataAction(true) - .withProperties(new OperationProperties()))); - model = BinaryData.fromObject(model).toObject(ResourceProviderOperationList.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - } -} 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 deleted file mode 100644 index dd7d1a941d8db..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingHostPoolReferenceTests.java +++ /dev/null @@ -1,30 +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.models.ScalingHostPoolReference; -import org.junit.jupiter.api.Assertions; - -public final class ScalingHostPoolReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingHostPoolReference model = - BinaryData - .fromString("{\"hostPoolArmPath\":\"pusuesn\",\"scalingPlanEnabled\":false}") - .toObject(ScalingHostPoolReference.class); - Assertions.assertEquals("pusuesn", 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); - model = BinaryData.fromObject(model).toObject(ScalingHostPoolReference.class); - Assertions.assertEquals("pusuesn", 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 deleted file mode 100644 index f0af7c955d35e..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchPropertiesTests.java +++ /dev/null @@ -1,144 +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.ScalingPlanPatchProperties; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingHostPoolReference; -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 org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPatchPropertiesTests { - @org.junit.jupiter.api.Test - 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}]}") - .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( - 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( - 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( - 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(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( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("vvdfwatkpnpul", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(true, 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") - .withSchedules( - Arrays - .asList( - new ScalingSchedule() - .withName("zywqsmbsu") - .withDaysOfWeek(Arrays.asList(ScalingScheduleDaysOfWeekItem.SATURDAY)) - .withRampUpStartTime(new Time().withHour(26085617).withMinute(1115871957)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(994913433) - .withRampUpCapacityThresholdPct(908271116) - .withPeakStartTime(new Time().withHour(57544677).withMinute(1510965337)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(376493890).withMinute(830050857)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(980316888) - .withRampDownCapacityThresholdPct(1173289641) - .withRampDownForceLogoffUsers(false) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(1867202070) - .withRampDownNotificationMessage("rrqnbpoczvyifqrv") - .withOffPeakStartTime(new Time().withHour(983918139).withMinute(1867018963)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST))) - .withHostPoolReferences( - Arrays - .asList( - new ScalingHostPoolReference() - .withHostPoolArmPath("vvdfwatkpnpul") - .withScalingPlanEnabled(true))); - 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( - 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( - 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( - 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(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( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("vvdfwatkpnpul", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(true, 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 deleted file mode 100644 index 098d934ed7619..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchTests.java +++ /dev/null @@ -1,147 +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.models.ScalingHostPoolReference; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPatch; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingSchedule; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPatchTests { - @org.junit.jupiter.api.Test - 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}]}}") - .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( - 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( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(509090660, model.schedules().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(545322213, 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( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("kthfui", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(true, 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") - .withSchedules( - Arrays - .asList( - new ScalingSchedule() - .withName("tehfiqscjeypvh") - .withDaysOfWeek(Arrays.asList()) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(693587344) - .withRampUpCapacityThresholdPct(1290040732) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownMinimumHostsPct(509090660) - .withRampDownCapacityThresholdPct(545322213) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(1069395538) - .withRampDownNotificationMessage("qjpkcattpngjcrc") - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), - new ScalingSchedule() - .withName("jh") - .withDaysOfWeek(Arrays.asList()) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(1964386727) - .withRampUpCapacityThresholdPct(1223642392) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(904416760) - .withRampDownCapacityThresholdPct(389510865) - .withRampDownForceLogoffUsers(false) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(1111397810) - .withRampDownNotificationMessage("ltrpmopj") - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST))) - .withHostPoolReferences( - Arrays - .asList( - new ScalingHostPoolReference().withHostPoolArmPath("kthfui").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( - 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( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(509090660, model.schedules().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(545322213, 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( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("kthfui", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(true, model.hostPoolReferences().get(0).scalingPlanEnabled()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} 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 deleted file mode 100644 index cc4296e51eb6a..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleInnerTests.java +++ /dev/null @@ -1,91 +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.ScalingPlanPooledScheduleInner; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -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; - -public final class ScalingPlanPooledScheduleInnerTests { - @org.junit.jupiter.api.Test - 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\"}") - .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(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(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()); - } - - @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)) - .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) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(1792680801) - .withRampDownNotificationMessage("g") - .withOffPeakStartTime(new Time().withHour(642461794).withMinute(799434019)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_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(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(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()); - } -} 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 deleted file mode 100644 index 8fe1d06db2bcb..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleListTests.java +++ /dev/null @@ -1,102 +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.ScalingPlanPooledScheduleInner; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledScheduleList; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPooledScheduleListTests { - @org.junit.jupiter.api.Test - 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\"}") - .toObject(ScalingPlanPooledScheduleList.class); - 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()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.value().get(0).peakLoadBalancingAlgorithm()); - 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()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.value().get(0).offPeakLoadBalancingAlgorithm()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingPlanPooledScheduleList model = - new ScalingPlanPooledScheduleList() - .withValue( - Arrays - .asList( - new ScalingPlanPooledScheduleInner() - .withDaysOfWeek(Arrays.asList()) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(989865410) - .withRampUpCapacityThresholdPct(1111271416) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownMinimumHostsPct(956878361) - .withRampDownCapacityThresholdPct(1391467998) - .withRampDownForceLogoffUsers(false) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(1493031892) - .withRampDownNotificationMessage("klyaxuconu") - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), - new ScalingPlanPooledScheduleInner() - .withDaysOfWeek(Arrays.asList()) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(1396036166) - .withRampUpCapacityThresholdPct(1792150681) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(878153378) - .withRampDownCapacityThresholdPct(946081931) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(267259716) - .withRampDownNotificationMessage("fcivfsnkym") - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST))); - model = BinaryData.fromObject(model).toObject(ScalingPlanPooledScheduleList.class); - 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()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.value().get(0).peakLoadBalancingAlgorithm()); - 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()); - 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 deleted file mode 100644 index 2cc548f4081de..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePatchTests.java +++ /dev/null @@ -1,91 +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.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedulePatch; -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; - -public final class ScalingPlanPooledSchedulePatchTests { - @org.junit.jupiter.api.Test - 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\"}") - .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(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(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(1446067033, model.rampDownStartTime().hour()); - Assertions.assertEquals(248274393, model.rampDownStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(583460875, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(1192449755, 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()); - } - - @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)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(1148741426) - .withRampUpCapacityThresholdPct(390798331) - .withPeakStartTime(new Time().withHour(1456647445).withMinute(353771493)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(1446067033).withMinute(248274393)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(583460875) - .withRampDownCapacityThresholdPct(1192449755) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(895884461) - .withRampDownNotificationMessage("mryw") - .withOffPeakStartTime(new Time().withHour(2134987728).withMinute(1133422967)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_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(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(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(1446067033, model.rampDownStartTime().hour()); - Assertions.assertEquals(248274393, model.rampDownStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(583460875, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(1192449755, 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()); - } -} 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 deleted file mode 100644 index 7e9d66302fc67..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePropertiesTests.java +++ /dev/null @@ -1,92 +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.ScalingPlanPooledScheduleProperties; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -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; - -public final class ScalingPlanPooledSchedulePropertiesTests { - @org.junit.jupiter.api.Test - 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\"}") - .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(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(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()); - } - - @org.junit.jupiter.api.Test - 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)) - .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)) - .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); - 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(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(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()); - } -} 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 deleted file mode 100644 index e1af402b2bdc8..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateWithResponseMockTests.java +++ /dev/null @@ -1,115 +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.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.ScalingPlanPooledSchedule; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -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 ScalingPlanPooledSchedulesCreateWithResponseMockTests { - @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\":[\"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\"}"; - - 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)); - - 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)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownStartTime(new Time().withHour(305978693).withMinute(1373594000)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownMinimumHostsPct(2120109491) - .withRampDownCapacityThresholdPct(1869546664) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(576086700) - .withRampDownNotificationMessage("gsgbdhuzq") - .withOffPeakStartTime(new Time().withHour(41953991).withMinute(1926562658)) - .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(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(990480911, response.rampDownStartTime().hour()); - Assertions.assertEquals(1145117333, response.rampDownStartTime().minute()); - Assertions - .assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, response.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1975492763, response.rampDownMinimumHostsPct()); - Assertions.assertEquals(169373915, 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(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 deleted file mode 100644 index 15cc5e521e365..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteWithResponseMockTests.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.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 ScalingPlanPooledSchedulesDeleteWithResponseMockTests { - @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 - .scalingPlanPooledSchedules() - .deleteWithResponse("zgkrvqe", "vtoepryutnw", "tpzdmovzvfvaawzq", 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 deleted file mode 100644 index 5f4f109f8c624..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetWithResponseMockTests.java +++ /dev/null @@ -1,95 +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.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.ScalingPlanPooledSchedule; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -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 ScalingPlanPooledSchedulesGetWithResponseMockTests { - @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\":[\"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\"}"; - - 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)); - - ScalingPlanPooledSchedule response = - manager - .scalingPlanPooledSchedules() - .getWithResponse("xjrk", "mbtrnegvmnvu", "eqvldspast", 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(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, response.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(646254417, response.rampDownStartTime().hour()); - Assertions.assertEquals(698504930, response.rampDownStartTime().minute()); - Assertions - .assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1482669533, response.rampDownMinimumHostsPct()); - Assertions.assertEquals(159855339, 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(SessionHostLoadBalancingAlgorithm.BREADTH_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 deleted file mode 100644 index 4520ba5458ad3..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListMockTests.java +++ /dev/null @@ -1,105 +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.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.ScalingPlanPooledSchedule; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -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 ScalingPlanPooledSchedulesListMockTests { - @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\":[\"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\"}]}"; - - 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 - .scalingPlanPooledSchedules() - .list("dflgzuri", "laecxndticok", 675680646, true, 635512255, 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( - 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( - 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( - 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(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( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, - response.iterator().next().offPeakLoadBalancingAlgorithm()); - } -} 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 deleted file mode 100644 index 2ea7d2c6e1886..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPropertiesTests.java +++ /dev/null @@ -1,218 +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.ScalingPlanProperties; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingHostPoolReference; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingHostPoolType; -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 org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPropertiesTests { - @org.junit.jupiter.api.Test - 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}]}") - .toObject(ScalingPlanProperties.class); - Assertions.assertEquals("khixuigdtopbo", model.description()); - Assertions.assertEquals("og", model.friendlyName()); - Assertions.assertEquals("m", 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( - 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()); - 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()); - 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(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( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, - model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("keyyi", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(true, 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") - .withHostPoolType(ScalingHostPoolType.POOLED) - .withExclusionTag("m") - .withSchedules( - Arrays - .asList( - new ScalingSchedule() - .withName("z") - .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)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(1382683860) - .withRampUpCapacityThresholdPct(465330089) - .withPeakStartTime(new Time().withHour(339779256).withMinute(1420716073)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(104949992).withMinute(1785723021)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownMinimumHostsPct(616844240) - .withRampDownCapacityThresholdPct(1328534140) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(1043685699) - .withRampDownNotificationMessage("hzgpphrcgyncocpe") - .withOffPeakStartTime(new Time().withHour(1965722470).withMinute(80244831)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST), - new ScalingSchedule() - .withName("ofsx") - .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) - .withRampDownForceLogoffUsers(false) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(1569035417) - .withRampDownNotificationMessage("ionle") - .withOffPeakStartTime(new Time().withHour(783809750).withMinute(1131419469)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), - new ScalingSchedule() - .withName("zxdpnqbqqw") - .withDaysOfWeek( - Arrays - .asList( - 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)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST))) - .withHostPoolReferences( - Arrays - .asList( - new ScalingHostPoolReference().withHostPoolArmPath("keyyi").withScalingPlanEnabled(true), - new ScalingHostPoolReference() - .withHostPoolArmPath("dlwtgrhpdj") - .withScalingPlanEnabled(true))); - model = BinaryData.fromObject(model).toObject(ScalingPlanProperties.class); - Assertions.assertEquals("khixuigdtopbo", model.description()); - Assertions.assertEquals("og", model.friendlyName()); - Assertions.assertEquals("m", 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( - 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()); - 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()); - 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(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( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, - model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("keyyi", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(true, 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 deleted file mode 100644 index a2c103c9c7920..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteByResourceGroupWithResponseMockTests.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.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 ScalingPlansDeleteByResourceGroupWithResponseMockTests { - @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 - .scalingPlans() - .deleteByResourceGroupWithResponse("iuxxpshneekulfg", "lqubkwdlen", 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 deleted file mode 100644 index ede83d9b06802..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingScheduleTests.java +++ /dev/null @@ -1,95 +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.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 org.junit.jupiter.api.Assertions; - -public final class ScalingScheduleTests { - @org.junit.jupiter.api.Test - 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\"}") - .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(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(264825105, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(1581858778, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(false, 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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingSchedule model = - new ScalingSchedule() - .withName("asxazjpqyegualhb") - .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)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(264825105) - .withRampDownCapacityThresholdPct(1581858778) - .withRampDownForceLogoffUsers(false) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(34788734) - .withRampDownNotificationMessage("cftadeh") - .withOffPeakStartTime(new Time().withHour(1636345438).withMinute(1194387790)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_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(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(264825105, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(1581858778, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(false, 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()); - } -} 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 deleted file mode 100644 index 7be431d70f224..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SendMessageTests.java +++ /dev/null @@ -1,29 +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.models.SendMessage; -import org.junit.jupiter.api.Assertions; - -public final class SendMessageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SendMessage model = - BinaryData - .fromString("{\"messageTitle\":\"iakp\",\"messageBody\":\"qqmtedltmmji\"}") - .toObject(SendMessage.class); - Assertions.assertEquals("iakp", model.messageTitle()); - Assertions.assertEquals("qqmtedltmmji", model.messageBody()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SendMessage model = new SendMessage().withMessageTitle("iakp").withMessageBody("qqmtedltmmji"); - model = BinaryData.fromObject(model).toObject(SendMessage.class); - Assertions.assertEquals("iakp", model.messageTitle()); - Assertions.assertEquals("qqmtedltmmji", 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 deleted file mode 100644 index bb43c95147647..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,46 +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.models.LogSpecification; -import com.azure.resourcemanager.desktopvirtualization.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceSpecification model = - BinaryData - .fromString( - "{\"logSpecifications\":[{\"name\":\"okjye\",\"displayName\":\"kvnipjoxz\",\"blobDuration\":\"chgejspodm\"},{\"name\":\"lzydehojwyahux\",\"displayName\":\"pmqnja\",\"blobDuration\":\"ixjsprozvcputeg\"}]}") - .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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceSpecification model = - new ServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new LogSpecification() - .withName("okjye") - .withDisplayName("kvnipjoxz") - .withBlobDuration("chgejspodm"), - new LogSpecification() - .withName("lzydehojwyahux") - .withDisplayName("pmqnja") - .withBlobDuration("ixjsprozvcputeg"))); - 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()); - } -} 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 0d8c45ddd4864..0000000000000 --- 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 deleted file mode 100644 index c083a9d541aef..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostListTests.java +++ /dev/null @@ -1,69 +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.SessionHostList; -import com.azure.resourcemanager.desktopvirtualization.models.Status; -import com.azure.resourcemanager.desktopvirtualization.models.UpdateState; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SessionHostListTests { - @org.junit.jupiter.api.Test - 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\"}") - .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(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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionHostList model = - new SessionHostList() - .withValue( - Arrays - .asList( - new SessionHostInner() - .withLastHeartBeat(OffsetDateTime.parse("2020-12-25T16:19:20Z")) - .withSessions(642347272) - .withAgentVersion("gssofwq") - .withAllowNewSession(false) - .withAssignedUser("xacqqudfnbyx") - .withFriendlyName("aabjyvayffimrz") - .withStatus(Status.SX_SSTACK_LISTENER_NOT_READY) - .withOsVersion("gsexne") - .withSxSStackVersion("dnw") - .withUpdateState(UpdateState.FAILED) - .withUpdateErrorMessage("syyceuzsoibjud"))); - 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(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()); - } -} 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 deleted file mode 100644 index 9e81603899a22..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchPropertiesTests.java +++ /dev/null @@ -1,35 +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.SessionHostPatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class SessionHostPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SessionHostPatchProperties model = - BinaryData - .fromString("{\"allowNewSession\":false,\"assignedUser\":\"duhpk\",\"friendlyName\":\"gymare\"}") - .toObject(SessionHostPatchProperties.class); - Assertions.assertEquals(false, model.allowNewSession()); - Assertions.assertEquals("duhpk", model.assignedUser()); - Assertions.assertEquals("gymare", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionHostPatchProperties model = - new SessionHostPatchProperties() - .withAllowNewSession(false) - .withAssignedUser("duhpk") - .withFriendlyName("gymare"); - model = BinaryData.fromObject(model).toObject(SessionHostPatchProperties.class); - Assertions.assertEquals(false, model.allowNewSession()); - Assertions.assertEquals("duhpk", model.assignedUser()); - Assertions.assertEquals("gymare", 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 deleted file mode 100644 index 8f9883da8b6a3..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchTests.java +++ /dev/null @@ -1,33 +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.models.SessionHostPatch; -import org.junit.jupiter.api.Assertions; - -public final class SessionHostPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SessionHostPatch model = - BinaryData - .fromString( - "{\"properties\":{\"allowNewSession\":true,\"assignedUser\":\"lr\",\"friendlyName\":\"yjmoadsu\"},\"id\":\"arm\",\"name\":\"wdmjsjqbjhhyx\",\"type\":\"rw\"}") - .toObject(SessionHostPatch.class); - Assertions.assertEquals(true, model.allowNewSession()); - Assertions.assertEquals("lr", model.assignedUser()); - Assertions.assertEquals("yjmoadsu", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionHostPatch model = - new SessionHostPatch().withAllowNewSession(true).withAssignedUser("lr").withFriendlyName("yjmoadsu"); - model = BinaryData.fromObject(model).toObject(SessionHostPatch.class); - Assertions.assertEquals(true, model.allowNewSession()); - Assertions.assertEquals("lr", model.assignedUser()); - Assertions.assertEquals("yjmoadsu", 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 deleted file mode 100644 index 3905ab353fe85..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteWithResponseMockTests.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.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 SessionHostsDeleteWithResponseMockTests { - @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 - .sessionHosts() - .deleteWithResponse("guyaip", "dsdaultxijjumf", "waz", false, 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/SessionHostsGetWithResponseMockTests.java deleted file mode 100644 index 50a7bb05774ee..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetWithResponseMockTests.java +++ /dev/null @@ -1,82 +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.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.SessionHost; -import com.azure.resourcemanager.desktopvirtualization.models.Status; -import com.azure.resourcemanager.desktopvirtualization.models.UpdateState; -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 SessionHostsGetWithResponseMockTests { - @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\":{\"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\"}"; - - 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)); - - SessionHost response = - manager - .sessionHosts() - .getWithResponse("hrbbpneqvcwwyy", "r", "ochpprpr", 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()); - } -} 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/SessionHostsListMockTests.java deleted file mode 100644 index 71f6f6498f436..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListMockTests.java +++ /dev/null @@ -1,83 +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.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.SessionHost; -import com.azure.resourcemanager.desktopvirtualization.models.Status; -import com.azure.resourcemanager.desktopvirtualization.models.UpdateState; -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 SessionHostsListMockTests { - @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\":{\"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\"}]}"; - - 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 - .sessionHosts() - .list("s", "sphaivmxyasflvg", 1752644697, false, 826140742, 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()); - } -} 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/SessionHostsUpdateWithResponseMockTests.java deleted file mode 100644 index b06821fdd6677..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateWithResponseMockTests.java +++ /dev/null @@ -1,92 +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.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.SessionHost; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostPatch; -import com.azure.resourcemanager.desktopvirtualization.models.Status; -import com.azure.resourcemanager.desktopvirtualization.models.UpdateState; -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 SessionHostsUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() 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\"}"; - - 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)); - - SessionHost response = - manager - .sessionHosts() - .updateWithResponse( - "qnmcjngzqdqx", - "bjwgnyfus", - "zsvtuikzhajqgl", - false, - new SessionHostPatch() - .withAllowNewSession(false) - .withAssignedUser("qryxyn") - .withFriendlyName("zrdpsovwxznptgoe"), - 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()); - } -} 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 deleted file mode 100644 index be2533cf6d7d7..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SkuTests.java +++ /dev/null @@ -1,43 +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.models.Sku; -import com.azure.resourcemanager.desktopvirtualization.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class SkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Sku model = - BinaryData - .fromString( - "{\"name\":\"wyqkgfgibm\",\"tier\":\"Basic\",\"size\":\"keqsrxybzqqedq\",\"family\":\"bciqfouflm\",\"capacity\":1828393347}") - .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()); - } - - @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); - 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()); - } -} 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 deleted file mode 100644 index 952a7cf23f861..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemInnerTests.java +++ /dev/null @@ -1,42 +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.StartMenuItemInner; -import org.junit.jupiter.api.Assertions; - -public final class StartMenuItemInnerTests { - @org.junit.jupiter.api.Test - 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\"}") - .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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StartMenuItemInner model = - new StartMenuItemInner() - .withAppAlias("us") - .withFilePath("slhs") - .withCommandLineArguments("deemao") - .withIconPath("xagkvtmelmqkrh") - .withIconIndex(1107885702); - 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()); - } -} 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 deleted file mode 100644 index f2c6e199ee159..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemListTests.java +++ /dev/null @@ -1,48 +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.StartMenuItemInner; -import com.azure.resourcemanager.desktopvirtualization.models.StartMenuItemList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class StartMenuItemListTests { - @org.junit.jupiter.api.Test - 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\"}") - .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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StartMenuItemList model = - new StartMenuItemList() - .withValue( - Arrays - .asList( - new StartMenuItemInner() - .withAppAlias("g") - .withFilePath("dxyt") - .withCommandLineArguments("oyrxvwfudwpzntxh") - .withIconPath("hl") - .withIconIndex(291050041))); - 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()); - } -} 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 deleted file mode 100644 index 43cdfb957b0bb..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemPropertiesTests.java +++ /dev/null @@ -1,42 +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.StartMenuItemProperties; -import org.junit.jupiter.api.Assertions; - -public final class StartMenuItemPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StartMenuItemProperties model = - BinaryData - .fromString( - "{\"appAlias\":\"crgvxpvgom\",\"filePath\":\"fmisg\",\"commandLineArguments\":\"nbbelda\",\"iconPath\":\"zbaliourqha\",\"iconIndex\":30531984}") - .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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StartMenuItemProperties model = - new StartMenuItemProperties() - .withAppAlias("crgvxpvgom") - .withFilePath("fmisg") - .withCommandLineArguments("nbbelda") - .withIconPath("zbaliourqha") - .withIconIndex(30531984); - 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()); - } -} 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 deleted file mode 100644 index baf600ee7d824..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListMockTests.java +++ /dev/null @@ -1,80 +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.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.StartMenuItem; -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 StartMenuItemsListMockTests { - @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\":{\"appAlias\":\"jjxundxgke\",\"filePath\":\"zhhzjhfjmhvvmu\",\"commandLineArguments\":\"pmuneqsx\",\"iconPath\":\"hfbuzjyihsasbhud\",\"iconIndex\":1053625203},\"id\":\"hyuemslyn\",\"name\":\"qyrp\",\"type\":\"oobrlttyms\"}]}"; - - 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 - .startMenuItems() - .list( - "sdtutnwlduyc", - "uzhyrmewipmvekdx", - 1888237693, - false, - 1994675840, - 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()); - } -} 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 deleted file mode 100644 index ecace0fb43e34..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/TimeTests.java +++ /dev/null @@ -1,26 +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.models.Time; -import org.junit.jupiter.api.Assertions; - -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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Time model = new Time().withHour(632380018).withMinute(737203180); - model = BinaryData.fromObject(model).toObject(Time.class); - Assertions.assertEquals(632380018, model.hour()); - Assertions.assertEquals(737203180, 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 deleted file mode 100644 index 661b131c11599..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionInnerTests.java +++ /dev/null @@ -1,45 +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.UserSessionInner; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationType; -import com.azure.resourcemanager.desktopvirtualization.models.SessionState; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class UserSessionInnerTests { - @org.junit.jupiter.api.Test - 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\"}") - .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()); - } - - @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")); - 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()); - } -} 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 deleted file mode 100644 index faf769cd68ac5..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionListTests.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.UserSessionInner; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationType; -import com.azure.resourcemanager.desktopvirtualization.models.SessionState; -import com.azure.resourcemanager.desktopvirtualization.models.UserSessionList; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UserSessionListTests { - @org.junit.jupiter.api.Test - 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\"}") - .toObject(UserSessionList.class); - Assertions.assertEquals("rpqlp", 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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserSessionList model = - new UserSessionList() - .withValue( - Arrays - .asList( - new UserSessionInner() - .withUserPrincipalName("rpqlp") - .withApplicationType(ApplicationType.DESKTOP) - .withSessionState(SessionState.DISCONNECTED) - .withActiveDirectoryUsername("qgbdbuta") - .withCreateTime(OffsetDateTime.parse("2021-06-13T06:16:01Z")), - new UserSessionInner() - .withUserPrincipalName("vljxywsu") - .withApplicationType(ApplicationType.REMOTE_APP) - .withSessionState(SessionState.ACTIVE) - .withActiveDirectoryUsername("dsytgadgvr") - .withCreateTime(OffsetDateTime.parse("2021-05-05T10:23:30Z")), - new UserSessionInner() - .withUserPrincipalName("ji") - .withApplicationType(ApplicationType.REMOTE_APP) - .withSessionState(SessionState.DISCONNECTED) - .withActiveDirectoryUsername("ohqkvpuvksgpls") - .withCreateTime(OffsetDateTime.parse("2021-01-28T10:41:26Z")))); - model = BinaryData.fromObject(model).toObject(UserSessionList.class); - Assertions.assertEquals("rpqlp", 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()); - } -} 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 deleted file mode 100644 index 2293627435d95..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionPropertiesTests.java +++ /dev/null @@ -1,45 +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.UserSessionProperties; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationType; -import com.azure.resourcemanager.desktopvirtualization.models.SessionState; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class UserSessionPropertiesTests { - @org.junit.jupiter.api.Test - 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\"}") - .toObject(UserSessionProperties.class); - Assertions.assertEquals("wrlkdmtn", 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()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserSessionProperties model = - new UserSessionProperties() - .withUserPrincipalName("wrlkdmtn") - .withApplicationType(ApplicationType.REMOTE_APP) - .withSessionState(SessionState.UNKNOWN) - .withActiveDirectoryUsername("llxdyhgs") - .withCreateTime(OffsetDateTime.parse("2021-10-24T07:42:50Z")); - model = BinaryData.fromObject(model).toObject(UserSessionProperties.class); - Assertions.assertEquals("wrlkdmtn", 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()); - } -} 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 deleted file mode 100644 index f19920acfa034..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteWithResponseMockTests.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.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 UserSessionsDeleteWithResponseMockTests { - @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 - .userSessions() - .deleteWithResponse("zcyjtot", "vopvp", "dbzqgqqihed", "vqwt", 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 deleted file mode 100644 index 970167492830d..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectWithResponseMockTests.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.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 UserSessionsDisconnectWithResponseMockTests { - @Test - public void testDisconnectWithResponse() 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 - .userSessions() - .disconnectWithResponse("czurtlei", "q", "bkwvzg", "zvd", 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 deleted file mode 100644 index 62e19ceb7b12b..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetWithResponseMockTests.java +++ /dev/null @@ -1,77 +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.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.ApplicationType; -import com.azure.resourcemanager.desktopvirtualization.models.SessionState; -import com.azure.resourcemanager.desktopvirtualization.models.UserSession; -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 UserSessionsGetWithResponseMockTests { - @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\":{\"objectId\":\"g\",\"userPrincipalName\":\"hcmavmqfo\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"Pending\",\"activeDirectoryUserName\":\"gyyprotwy\",\"createTime\":\"2020-12-26T18:22:26Z\"},\"id\":\"d\",\"name\":\"bxhugcmjkavlgorb\",\"type\":\"ftpmdtzfjltfv\"}"; - - 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)); - - UserSession response = - manager - .userSessions() - .getWithResponse( - "prlpy", "nuciqdsmexiit", "fuxtyasiibmiybnn", "stgnl", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hcmavmqfo", 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()); - } -} 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 deleted file mode 100644 index be9c65a7af21f..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolMockTests.java +++ /dev/null @@ -1,83 +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.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.ApplicationType; -import com.azure.resourcemanager.desktopvirtualization.models.SessionState; -import com.azure.resourcemanager.desktopvirtualization.models.UserSession; -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 UserSessionsListByHostPoolMockTests { - @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\":{\"objectId\":\"btijvacvbm\",\"userPrincipalName\":\"bqqxlaj\",\"applicationType\":\"Desktop\",\"sessionState\":\"UserProfileDiskMounted\",\"activeDirectoryUserName\":\"evehjkuyxoaf\",\"createTime\":\"2021-03-08T11:58:40Z\"},\"id\":\"qltfaey\",\"name\":\"inmfgvxirp\",\"type\":\"hriypoqeyhlqhy\"}]}"; - - 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 - .userSessions() - .listByHostPool( - "yhsgz", - "czbgomfgbeg", - "qgleohibetnluank", - 416708927, - true, - 1893496735, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bqqxlaj", 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()); - } -} 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 deleted file mode 100644 index 2514f08a7e2f6..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListMockTests.java +++ /dev/null @@ -1,76 +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.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.ApplicationType; -import com.azure.resourcemanager.desktopvirtualization.models.SessionState; -import com.azure.resourcemanager.desktopvirtualization.models.UserSession; -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 UserSessionsListMockTests { - @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\":{\"objectId\":\"hdxbzlm\",\"userPrincipalName\":\"uapcvhdbevwqqxe\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"LogOff\",\"activeDirectoryUserName\":\"zinkfkbgbzbowxeq\",\"createTime\":\"2021-11-27T16:03:54Z\"},\"id\":\"jmygvk\",\"name\":\"qkjjeokbz\",\"type\":\"fezrx\"}]}"; - - 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 - .userSessions() - .list("ky", "bcysih", "gqcwdhohsdtmc", 582075475, false, 223413800, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("uapcvhdbevwqqxe", response.iterator().next().userPrincipalName()); - Assertions.assertEquals(ApplicationType.REMOTE_APP, 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()); - } -} 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 deleted file mode 100644 index 4f8bcef1661c9..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageWithResponseMockTests.java +++ /dev/null @@ -1,70 +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.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.SendMessage; -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 UserSessionsSendMessageWithResponseMockTests { - @Test - public void testSendMessageWithResponse() 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 - .userSessions() - .sendMessageWithResponse( - "bzdixzmq", - "noda", - "opqhewjptmc", - "sbostzel", - new SendMessage().withMessageTitle("la").withMessageBody("tmzlbiojlv"), - 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 deleted file mode 100644 index 727d978a5eb68..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchPropertiesTests.java +++ /dev/null @@ -1,37 +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.WorkspacePatchProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkspacePatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspacePatchProperties model = - BinaryData - .fromString( - "{\"description\":\"izuckyfihrfidfvz\",\"friendlyName\":\"zuhtymwisdkfthwx\",\"applicationGroupReferences\":[\"eiwaopvkmi\"]}") - .toObject(WorkspacePatchProperties.class); - Assertions.assertEquals("izuckyfihrfidfvz", model.description()); - Assertions.assertEquals("zuhtymwisdkfthwx", model.friendlyName()); - Assertions.assertEquals("eiwaopvkmi", model.applicationGroupReferences().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspacePatchProperties model = - new WorkspacePatchProperties() - .withDescription("izuckyfihrfidfvz") - .withFriendlyName("zuhtymwisdkfthwx") - .withApplicationGroupReferences(Arrays.asList("eiwaopvkmi")); - model = BinaryData.fromObject(model).toObject(WorkspacePatchProperties.class); - Assertions.assertEquals("izuckyfihrfidfvz", model.description()); - Assertions.assertEquals("zuhtymwisdkfthwx", model.friendlyName()); - Assertions.assertEquals("eiwaopvkmi", model.applicationGroupReferences().get(0)); - } -} 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 deleted file mode 100644 index a458811629a4f..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchTests.java +++ /dev/null @@ -1,62 +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.models.WorkspacePatch; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkspacePatchTests { - @org.junit.jupiter.api.Test - 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\"]}}") - .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)); - } - - @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")); - 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)); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} 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 deleted file mode 100644 index b89ecbe64dad0..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePropertiesTests.java +++ /dev/null @@ -1,37 +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.WorkspaceProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkspacePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceProperties model = - BinaryData - .fromString( - "{\"objectId\":\"jofxqe\",\"description\":\"jaeq\",\"friendlyName\":\"qjbasvms\",\"applicationGroupReferences\":[\"ulngsntn\",\"ybkzgcwr\",\"clxxwrljdo\",\"skcqvkocrcjd\"],\"cloudPcResource\":false}") - .toObject(WorkspaceProperties.class); - Assertions.assertEquals("jaeq", model.description()); - Assertions.assertEquals("qjbasvms", model.friendlyName()); - Assertions.assertEquals("ulngsntn", model.applicationGroupReferences().get(0)); - } - - @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")); - model = BinaryData.fromObject(model).toObject(WorkspaceProperties.class); - Assertions.assertEquals("jaeq", model.description()); - Assertions.assertEquals("qjbasvms", model.friendlyName()); - Assertions.assertEquals("ulngsntn", model.applicationGroupReferences().get(0)); - } -} 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 deleted file mode 100644 index 02820ea3c8bb9..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,61 +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.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 WorkspacesDeleteByResourceGroupWithResponseMockTests { - @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.workspaces().deleteByResourceGroupWithResponse("thrrgh", "jbdhqxvc", com.azure.core.util.Context.NONE); - } -}