From acec3a9a8491fd0fc46711ac698bbac8cdd3819b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 14 Oct 2022 02:02:07 +0000 Subject: [PATCH] CodeGen from PR 20683 in Azure/azure-rest-api-specs Merge 5082112b9824acf19db6e48fa33600a382b267b3 into 065033d1c4087a2b009e71c0b3f0666718354ebd --- .../CHANGELOG.md | 4 +- .../README.md | 4 +- .../SAMPLE.md | 491 ++--- .../pom.xml | 2 +- .../DesktopVirtualizationManager.java | 52 +- .../fluent/ApplicationGroupsClient.java | 214 +- .../fluent/ApplicationsClient.java | 192 +- .../DesktopVirtualizationApiClient.java | 21 +- .../fluent/DesktopsClient.java | 117 +- .../fluent/HostPoolsClient.java | 235 +-- .../fluent/MsixImagesClient.java | 16 - .../fluent/MsixPackagesClient.java | 192 +- .../fluent/OperationsClient.java | 11 - .../PrivateEndpointConnectionsClient.java | 532 ----- .../fluent/PrivateLinkResourcesClient.java | 97 - .../ScalingPlanPooledSchedulesClient.java | 188 ++ .../fluent/ScalingPlansClient.java | 209 +- .../fluent/SessionHostsClient.java | 176 +- .../fluent/StartMenuItemsClient.java | 25 +- .../fluent/UserSessionsClient.java | 264 +-- .../fluent/WorkspacesClient.java | 179 +- .../fluent/models/ApplicationGroupInner.java | 28 +- .../ApplicationGroupPatchProperties.java | 4 + .../models/ApplicationGroupProperties.java | 34 +- .../fluent/models/ApplicationInner.java | 4 + .../models/ApplicationPatchProperties.java | 12 +- .../fluent/models/ApplicationProperties.java | 12 +- .../fluent/models/DesktopInner.java | 4 + .../fluent/models/DesktopPatchProperties.java | 4 + .../fluent/models/DesktopProperties.java | 4 + .../fluent/models/ExpandMsixImageInner.java | 4 + .../models/ExpandMsixImageProperties.java | 7 +- .../fluent/models/HostPoolInner.java | 50 +- .../models/HostPoolPatchProperties.java | 42 +- .../models/HostPoolPropertiesInner.java | 74 +- .../fluent/models/MsixPackageInner.java | 4 + .../models/MsixPackagePatchProperties.java | 4 + .../fluent/models/MsixPackageProperties.java | 7 +- .../PrivateEndpointConnectionProperties.java | 121 -- ...EndpointConnectionWithSystemDataInner.java | 65 - .../models/PrivateLinkResourceInner.java | 81 - .../models/PrivateLinkResourceProperties.java | 77 - .../fluent/models/RegistrationInfoInner.java | 4 + .../ResourceProviderOperationInner.java | 4 + .../fluent/models/ScalingPlanInner.java | 28 +- .../models/ScalingPlanPatchProperties.java | 4 + .../ScalingPlanPooledScheduleInner.java | 467 +++++ .../ScalingPlanPooledScheduleProperties.java | 487 +++++ .../fluent/models/ScalingPlanProperties.java | 20 +- .../fluent/models/SessionHostInner.java | 27 + .../models/SessionHostPatchProperties.java | 30 + .../fluent/models/SessionHostProperties.java | 30 + .../fluent/models/StartMenuItemInner.java | 4 + .../models/StartMenuItemProperties.java | 4 + .../fluent/models/UserSessionInner.java | 4 + .../fluent/models/UserSessionProperties.java | 4 + .../fluent/models/WorkspaceInner.java | 30 +- .../models/WorkspacePatchProperties.java | 29 +- .../fluent/models/WorkspaceProperties.java | 33 +- .../implementation/ApplicationGroupImpl.java | 10 - .../ApplicationGroupsClientImpl.java | 199 +- .../implementation/ApplicationGroupsImpl.java | 40 +- .../ApplicationsClientImpl.java | 225 +- .../implementation/ApplicationsImpl.java | 34 +- ...DesktopVirtualizationApiClientBuilder.java | 34 +- .../DesktopVirtualizationApiClientImpl.java | 44 +- .../implementation/DesktopsClientImpl.java | 169 +- .../implementation/DesktopsImpl.java | 35 +- .../implementation/HostPoolImpl.java | 39 +- .../HostPoolPropertiesImpl.java | 11 +- .../implementation/HostPoolsClientImpl.java | 285 ++- .../implementation/HostPoolsImpl.java | 50 +- .../implementation/MsixImagesClientImpl.java | 8 +- .../MsixPackagesClientImpl.java | 218 +- .../implementation/MsixPackagesImpl.java | 33 +- .../implementation/OperationsClientImpl.java | 8 +- ...eEndpointConnectionWithSystemDataImpl.java | 61 - .../PrivateEndpointConnectionsClientImpl.java | 1836 ----------------- .../PrivateEndpointConnectionsImpl.java | 222 -- .../PrivateLinkResourceImpl.java | 65 - .../PrivateLinkResourcesClientImpl.java | 622 ------ .../PrivateLinkResourcesImpl.java | 62 - .../implementation/ScalingPlanImpl.java | 20 +- .../ScalingPlanPooledScheduleImpl.java | 407 ++++ .../ScalingPlanPooledSchedulesClientImpl.java | 1202 +++++++++++ .../ScalingPlanPooledSchedulesImpl.java | 207 ++ .../ScalingPlansClientImpl.java | 336 ++- .../implementation/ScalingPlansImpl.java | 52 +- .../implementation/SessionHostImpl.java | 4 + .../SessionHostsClientImpl.java | 212 +- .../implementation/SessionHostsImpl.java | 47 +- .../StartMenuItemsClientImpl.java | 99 +- .../implementation/StartMenuItemsImpl.java | 12 +- .../UserSessionsClientImpl.java | 364 ++-- .../implementation/UserSessionsImpl.java | 64 +- .../implementation/WorkspaceImpl.java | 15 - .../implementation/WorkspacesClientImpl.java | 176 +- .../implementation/WorkspacesImpl.java | 35 +- .../models/AgentUpdatePatchProperties.java | 139 ++ .../models/AgentUpdateProperties.java | 138 ++ .../models/ApplicationGroup.java | 20 +- .../models/ApplicationGroupList.java | 10 +- .../models/ApplicationGroupPatch.java | 4 + .../models/ApplicationGroupType.java | 2 +- .../models/ApplicationGroups.java | 32 +- .../models/ApplicationList.java | 10 +- .../models/ApplicationPatch.java | 4 + .../models/ApplicationType.java | 2 +- .../models/Applications.java | 33 +- .../models/CommandLineSetting.java | 5 +- .../models/DayOfWeek.java | 66 + .../models/DesktopList.java | 10 +- .../models/DesktopPatch.java | 4 + .../models/Desktops.java | 43 +- .../models/ExpandMsixImageList.java | 10 +- .../models/HealthCheckName.java | 2 +- .../models/HealthCheckResult.java | 2 +- .../models/HostPool.java | 69 +- .../models/HostPoolList.java | 10 +- .../models/HostPoolPatch.java | 22 +- .../models/HostPoolProperties.java | 15 +- .../models/HostPoolType.java | 2 +- .../models/HostPools.java | 43 +- .../models/Identity.java | 4 + .../models/LoadBalancerType.java | 2 +- .../models/LogSpecification.java | 4 + .../MaintenanceWindowPatchProperties.java | 76 + .../models/MaintenanceWindowProperties.java | 76 + .../models/MigrationRequestProperties.java | 72 - .../models/MsixImageUri.java | 4 + .../models/MsixPackageApplications.java | 7 +- .../models/MsixPackageDependencies.java | 4 + .../models/MsixPackageList.java | 10 +- .../models/MsixPackagePatch.java | 4 + .../models/MsixPackages.java | 33 +- .../models/Operation.java | 47 - .../models/OperationProperties.java | 4 + .../models/PersonalDesktopAssignmentType.java | 2 +- .../desktopvirtualization/models/Plan.java | 15 +- .../models/PreferredAppGroupType.java | 2 +- .../models/PrivateEndpoint.java | 35 - .../models/PrivateEndpointConnection.java | 113 - ...intConnectionListResultWithSystemData.java | 67 - ...teEndpointConnectionProvisioningState.java | 45 - ...ivateEndpointConnectionWithSystemData.java | 70 - .../models/PrivateEndpointConnections.java | 270 --- ...rivateEndpointServiceConnectionStatus.java | 42 - .../models/PrivateLinkResource.java | 60 - .../models/PrivateLinkResources.java | 61 - .../PrivateLinkServiceConnectionState.java | 104 - .../models/PublicNetworkAccess.java | 38 - .../models/RegistrationInfoPatch.java | 4 + .../models/RegistrationTokenOperation.java | 2 +- .../models/RemoteApplicationType.java | 2 +- .../models/ResourceIdentityType.java | 6 +- .../ResourceModelWithAllowedPropertySet.java | 29 +- ...ceModelWithAllowedPropertySetIdentity.java | 4 + ...sourceModelWithAllowedPropertySetPlan.java | 4 + ...esourceModelWithAllowedPropertySetSku.java | 4 + .../ResourceProviderOperationDisplay.java | 4 + .../models/ResourceProviderOperationList.java | 4 + .../models/ScalingHostPoolReference.java | 4 + .../models/ScalingHostPoolType.java | 2 +- .../models/ScalingPlan.java | 30 +- .../models/ScalingPlanList.java | 10 +- .../models/ScalingPlanPatch.java | 4 + .../models/ScalingPlanPooledSchedule.java | 638 ++++++ ...ava => ScalingPlanPooledScheduleList.java} | 28 +- .../ScalingPlanPooledSchedulePatch.java | 440 ++++ .../models/ScalingPlanPooledSchedules.java | 154 ++ .../models/ScalingPlans.java | 42 +- .../models/ScalingSchedule.java | 12 +- .../models/SendMessage.java | 4 + .../models/ServiceSpecification.java | 4 + .../models/SessionHost.java | 7 + .../SessionHostComponentUpdateType.java | 38 + .../SessionHostHealthCheckFailureDetails.java | 4 + .../models/SessionHostHealthCheckReport.java | 4 + .../models/SessionHostList.java | 10 +- .../SessionHostLoadBalancingAlgorithm.java | 2 +- .../models/SessionHostPatch.java | 27 + .../models/SessionHosts.java | 47 +- .../models/SessionState.java | 2 +- .../desktopvirtualization/models/Sku.java | 20 +- .../desktopvirtualization/models/SkuTier.java | 9 +- .../models/SsoSecretType.java | 2 +- .../models/StartMenuItemList.java | 10 +- .../models/StartMenuItems.java | 11 +- .../desktopvirtualization/models/Status.java | 2 +- .../models/StopHostsWhen.java | 2 +- .../desktopvirtualization/models/Time.java | 4 + .../models/UpdateState.java | 2 +- .../models/UserSessionList.java | 10 +- .../models/UserSessions.java | 74 +- .../models/Workspace.java | 37 +- .../models/WorkspaceList.java | 10 +- .../models/WorkspacePatch.java | 27 +- .../models/Workspaces.java | 24 +- ...pplicationGroupsCreateOrUpdateSamples.java | 9 +- .../ApplicationGroupsDeleteSamples.java | 6 +- ...cationGroupsGetByResourceGroupSamples.java | 2 +- ...ationGroupsListByResourceGroupSamples.java | 5 +- .../ApplicationGroupsListSamples.java | 2 +- .../ApplicationGroupsUpdateSamples.java | 2 +- .../ApplicationsCreateOrUpdateSamples.java | 2 +- .../generated/ApplicationsDeleteSamples.java | 2 +- .../generated/ApplicationsGetSamples.java | 2 +- .../generated/ApplicationsListSamples.java | 4 +- .../generated/ApplicationsUpdateSamples.java | 2 +- .../generated/DesktopsGetSamples.java | 2 +- .../generated/DesktopsListSamples.java | 4 +- .../generated/DesktopsUpdateSamples.java | 2 +- .../HostPoolsCreateOrUpdateSamples.java | 26 +- .../generated/HostPoolsDeleteSamples.java | 2 +- .../HostPoolsGetByResourceGroupSamples.java | 2 +- .../HostPoolsListByResourceGroupSamples.java | 4 +- .../generated/HostPoolsListSamples.java | 4 +- ...PoolsRetrieveRegistrationTokenSamples.java | 2 +- .../generated/HostPoolsUpdateSamples.java | 19 +- .../generated/MsixImagesExpandSamples.java | 2 +- .../MsixPackagesCreateOrUpdateSamples.java | 2 +- .../generated/MsixPackagesDeleteSamples.java | 2 +- .../generated/MsixPackagesGetSamples.java | 2 +- .../generated/MsixPackagesListSamples.java | 4 +- .../generated/MsixPackagesUpdateSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- ...intConnectionsDeleteByHostPoolSamples.java | 26 - ...ntConnectionsDeleteByWorkspaceSamples.java | 26 - ...dpointConnectionsGetByHostPoolSamples.java | 26 - ...pointConnectionsGetByWorkspaceSamples.java | 26 - ...ointConnectionsListByWorkspaceSamples.java | 23 - ...intConnectionsUpdateByHostPoolSamples.java | 38 - ...ntConnectionsUpdateByWorkspaceSamples.java | 38 - ...alingPlanPooledSchedulesCreateSamples.java | 49 + ...lingPlanPooledSchedulesDeleteSamples.java} | 14 +- ...ScalingPlanPooledSchedulesGetSamples.java} | 14 +- ...calingPlanPooledSchedulesListSamples.java} | 12 +- ...alingPlanPooledSchedulesUpdateSamples.java | 45 + .../generated/ScalingPlansCreateSamples.java | 4 +- .../generated/ScalingPlansDeleteSamples.java | 4 +- ...ScalingPlansGetByResourceGroupSamples.java | 2 +- .../ScalingPlansListByHostPoolSamples.java | 4 +- ...calingPlansListByResourceGroupSamples.java | 4 +- .../generated/ScalingPlansListSamples.java | 4 +- .../generated/ScalingPlansUpdateSamples.java | 2 +- .../generated/SessionHostsDeleteSamples.java | 2 +- .../generated/SessionHostsGetSamples.java | 2 +- .../generated/SessionHostsListSamples.java | 4 +- .../generated/SessionHostsUpdateSamples.java | 7 +- .../generated/StartMenuItemsListSamples.java | 4 +- .../generated/UserSessionsDeleteSamples.java | 2 +- .../UserSessionsDisconnectSamples.java | 2 +- .../generated/UserSessionsGetSamples.java | 2 +- .../UserSessionsListByHostPoolSamples.java | 5 +- .../generated/UserSessionsListSamples.java | 6 +- .../UserSessionsSendMessageSamples.java | 2 +- .../WorkspacesCreateOrUpdateSamples.java | 2 +- .../generated/WorkspacesDeleteSamples.java | 4 +- .../WorkspacesGetByResourceGroupSamples.java | 2 +- .../WorkspacesListByResourceGroupSamples.java | 4 +- .../generated/WorkspacesListSamples.java | 2 +- .../generated/WorkspacesUpdateSamples.java | 4 +- 262 files changed, 8137 insertions(+), 8823 deletions(-) delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateEndpointConnectionsClient.java delete 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/ScalingPlanPooledSchedulesClient.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateEndpointConnectionProperties.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateEndpointConnectionWithSystemDataInner.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateLinkResourceInner.java delete 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/ScalingPlanPooledScheduleInner.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPooledScheduleProperties.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionWithSystemDataImpl.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsClientImpl.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsImpl.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourceImpl.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesClientImpl.java delete 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/ScalingPlanPooledScheduleImpl.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPooledSchedulesClientImpl.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPooledSchedulesImpl.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AgentUpdatePatchProperties.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AgentUpdateProperties.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DayOfWeek.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MaintenanceWindowPatchProperties.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MaintenanceWindowProperties.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MigrationRequestProperties.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Operation.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpoint.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnection.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionListResultWithSystemData.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionProvisioningState.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionWithSystemData.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnections.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointServiceConnectionStatus.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResource.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResources.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkServiceConnectionState.java delete 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/ScalingPlanPooledSchedule.java rename sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/{PrivateLinkResourceListResult.java => ScalingPlanPooledScheduleList.java} (61%) create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedulePatch.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedules.java create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostComponentUpdateType.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolSamples.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceSamples.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolSamples.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceSamples.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceSamples.java delete mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolSamples.java delete 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/ScalingPlanPooledSchedulesCreateSamples.java rename sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/{PrivateLinkResourcesListByWorkspaceSamples.java => ScalingPlanPooledSchedulesDeleteSamples.java} (51%) rename sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/{PrivateEndpointConnectionsListByHostPoolSamples.java => ScalingPlanPooledSchedulesGetSamples.java} (52%) rename sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/{PrivateLinkResourcesListByHostPoolSamples.java => ScalingPlanPooledSchedulesListSamples.java} (53%) create mode 100644 sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md index f49ea63707c52..6a63b1d660731 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2022-10-14) + +- 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). ### Features Added diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/README.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/README.md index 717b4fc2ac127..0a25b54ed9402 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-preview-2021-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-2022-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-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md index 8dfa5e819280a..d6a6d09bc4917 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md @@ -50,21 +50,13 @@ - [List](#operations_list) -## PrivateEndpointConnections +## ScalingPlanPooledSchedules -- [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) +- [Create](#scalingplanpooledschedules_create) +- [Delete](#scalingplanpooledschedules_delete) +- [Get](#scalingplanpooledschedules_get) +- [List](#scalingplanpooledschedules_list) +- [Update](#scalingplanpooledschedules_update) ## ScalingPlans @@ -108,15 +100,13 @@ ```java import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupType; -import com.azure.resourcemanager.desktopvirtualization.models.MigrationRequestProperties; -import com.azure.resourcemanager.desktopvirtualization.models.Operation; import java.util.HashMap; import java.util.Map; /** Samples for ApplicationGroups CreateOrUpdate. */ public final class ApplicationGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Create.json */ /** * Sample code: ApplicationGroup_Create. @@ -136,11 +126,6 @@ public final class ApplicationGroupsCreateOrUpdateSamples { .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") - .withMigrationRequest( - new MigrationRequestProperties() - .withOperation(Operation.START) - .withMigrationPath( - "TenantGroups/{defaultV1TenantGroup.Name}/Tenants/{defaultV1Tenant.Name}/HostPools/{sessionHostPool.Name}")) .create(); } @@ -165,7 +150,7 @@ import com.azure.core.util.Context; /** Samples for ApplicationGroups Delete. */ public final class ApplicationGroupsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Delete.json */ /** * Sample code: ApplicationGroup_Delete. @@ -174,7 +159,9 @@ public final class ApplicationGroupsDeleteSamples { */ public static void applicationGroupDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applicationGroups().deleteWithResponse("resourceGroup1", "applicationGroup1", Context.NONE); + manager + .applicationGroups() + .deleteByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", Context.NONE); } } ``` @@ -187,7 +174,7 @@ import com.azure.core.util.Context; /** Samples for ApplicationGroups GetByResourceGroup. */ public final class ApplicationGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Get.json */ /** * Sample code: ApplicationGroup_Get. @@ -209,7 +196,7 @@ import com.azure.core.util.Context; /** Samples for ApplicationGroups List. */ public final class ApplicationGroupsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_ListBySubscription.json */ /** * Sample code: ApplicationGroup_List. @@ -231,7 +218,7 @@ import com.azure.core.util.Context; /** Samples for ApplicationGroups ListByResourceGroup. */ public final class ApplicationGroupsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_ListByResourceGroup.json */ /** * Sample code: ApplicationGroup_ListByResourceGroup. @@ -242,7 +229,8 @@ public final class ApplicationGroupsListByResourceGroupSamples { com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .applicationGroups() - .listByResourceGroup("resourceGroup1", "applicationGroupType eq 'RailApplication'", Context.NONE); + .listByResourceGroup( + "resourceGroup1", "applicationGroupType eq 'RailApplication'", 10, true, 0, Context.NONE); } } ``` @@ -258,7 +246,7 @@ import java.util.Map; /** Samples for ApplicationGroups Update. */ public final class ApplicationGroupsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Update.json */ /** * Sample code: ApplicationGroups_Update. @@ -301,7 +289,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/preview/2021-09-03-preview/examples/Application_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_Create.json */ /** * Sample code: Application_Create. @@ -335,7 +323,7 @@ import com.azure.core.util.Context; /** Samples for Applications Delete. */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Application_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_Delete.json */ /** * Sample code: Application_Delete. @@ -357,7 +345,7 @@ import com.azure.core.util.Context; /** Samples for Applications Get. */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Application_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_Get.json */ /** * Sample code: Application_Get. @@ -379,7 +367,7 @@ import com.azure.core.util.Context; /** Samples for Applications List. */ public final class ApplicationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Application_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_List.json */ /** * Sample code: Applications_List. @@ -388,7 +376,7 @@ public final class ApplicationsListSamples { */ public static void applicationsList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applications().list("resourceGroup1", "applicationGroup1", Context.NONE); + manager.applications().list("resourceGroup1", "applicationGroup1", 10, true, 0, Context.NONE); } } ``` @@ -404,7 +392,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/preview/2021-09-03-preview/examples/Application_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_Update.json */ /** * Sample code: Application_Update. @@ -442,7 +430,7 @@ import com.azure.core.util.Context; /** Samples for Desktops Get. */ public final class DesktopsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Desktop_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Desktop_Get.json */ /** * Sample code: Desktop_Get. @@ -464,7 +452,7 @@ import com.azure.core.util.Context; /** Samples for Desktops List. */ public final class DesktopsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Desktop_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Desktop_List.json */ /** * Sample code: Desktop_List. @@ -473,7 +461,7 @@ public final class DesktopsListSamples { */ public static void desktopList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.desktops().list("resourceGroup1", "applicationGroup1", Context.NONE); + manager.desktops().list("resourceGroup1", "applicationGroup1", 10, true, 0, Context.NONE); } } ``` @@ -487,7 +475,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/preview/2021-09-03-preview/examples/Desktop_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Desktop_Update.json */ /** * Sample code: Desktop_Update. @@ -512,23 +500,25 @@ public final class DesktopsUpdateSamples { ```java import com.azure.resourcemanager.desktopvirtualization.fluent.models.RegistrationInfoInner; +import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdateProperties; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; import com.azure.resourcemanager.desktopvirtualization.models.HostPoolType; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; -import com.azure.resourcemanager.desktopvirtualization.models.MigrationRequestProperties; -import com.azure.resourcemanager.desktopvirtualization.models.Operation; +import com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowProperties; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationTokenOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHostComponentUpdateType; import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for HostPools CreateOrUpdate. */ public final class HostPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_Create.json */ /** * Sample code: HostPool_Create. @@ -560,12 +550,16 @@ public final class HostPoolsCreateOrUpdateSamples { .withSsoClientSecretKeyVaultPath("https://keyvault/secret") .withSsoSecretType(SsoSecretType.SHARED_KEY) .withStartVMOnConnect(false) - .withMigrationRequest( - new MigrationRequestProperties() - .withOperation(Operation.START) - .withMigrationPath( - "TenantGroups/{defaultV1TenantGroup.Name}/Tenants/{defaultV1Tenant.Name}/HostPools/{sessionHostPool.Name}")) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .withAgentUpdate( + new AgentUpdateProperties() + .withType(SessionHostComponentUpdateType.SCHEDULED) + .withUseSessionHostLocalTime(false) + .withMaintenanceWindowTimeZone("Alaskan Standard Time") + .withMaintenanceWindows( + Arrays + .asList( + new MaintenanceWindowProperties().withHour(7).withDayOfWeek(DayOfWeek.FRIDAY), + new MaintenanceWindowProperties().withHour(8).withDayOfWeek(DayOfWeek.SATURDAY)))) .create(); } @@ -590,7 +584,7 @@ import com.azure.core.util.Context; /** Samples for HostPools Delete. */ public final class HostPoolsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_Delete.json */ /** * Sample code: HostPool_Delete. @@ -612,7 +606,7 @@ import com.azure.core.util.Context; /** Samples for HostPools GetByResourceGroup. */ public final class HostPoolsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_Get.json */ /** * Sample code: HostPool_Get. @@ -634,7 +628,7 @@ import com.azure.core.util.Context; /** Samples for HostPools List. */ public final class HostPoolsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_List.json */ /** * Sample code: HostPool_List. @@ -643,7 +637,7 @@ public final class HostPoolsListSamples { */ public static void hostPoolList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.hostPools().list(Context.NONE); + manager.hostPools().list(10, true, 0, Context.NONE); } } ``` @@ -656,7 +650,7 @@ import com.azure.core.util.Context; /** Samples for HostPools ListByResourceGroup. */ public final class HostPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_ListByResourceGroup.json */ /** * Sample code: HostPool_ListByResourceGroup. @@ -665,7 +659,7 @@ public final class HostPoolsListByResourceGroupSamples { */ public static void hostPoolListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.hostPools().listByResourceGroup("resourceGroup1", Context.NONE); + manager.hostPools().listByResourceGroup("resourceGroup1", 10, true, 0, Context.NONE); } } ``` @@ -678,7 +672,7 @@ import com.azure.core.util.Context; /** Samples for HostPools RetrieveRegistrationToken. */ public final class HostPoolsRetrieveRegistrationTokenSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPools_RetrieveRegistrationToken_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPools_RetrieveRegistrationToken_Post.json */ /** * Sample code: HostPools_RetrieveRegistrationToken_Post. @@ -696,21 +690,25 @@ public final class HostPoolsRetrieveRegistrationTokenSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdatePatchProperties; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; import com.azure.resourcemanager.desktopvirtualization.models.HostPool; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; +import com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowPatchProperties; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfoPatch; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationTokenOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHostComponentUpdateType; import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for HostPools Update. */ public final class HostPoolsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_Update.json */ /** * Sample code: HostPool_Update. @@ -739,7 +737,16 @@ public final class HostPoolsUpdateSamples { .withSsoClientSecretKeyVaultPath("https://keyvault/secret") .withSsoSecretType(SsoSecretType.SHARED_KEY) .withStartVMOnConnect(false) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .withAgentUpdate( + new AgentUpdatePatchProperties() + .withType(SessionHostComponentUpdateType.SCHEDULED) + .withUseSessionHostLocalTime(false) + .withMaintenanceWindowTimeZone("Alaskan Standard Time") + .withMaintenanceWindows( + Arrays + .asList( + new MaintenanceWindowPatchProperties().withHour(7).withDayOfWeek(DayOfWeek.FRIDAY), + new MaintenanceWindowPatchProperties().withHour(8).withDayOfWeek(DayOfWeek.SATURDAY)))) .apply(); } @@ -765,7 +772,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/preview/2021-09-03-preview/examples/MsixImage_Expand_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixImage_Expand_Post.json */ /** * Sample code: MsixImage_Expand. @@ -792,7 +799,7 @@ import java.util.Arrays; /** Samples for MsixPackages CreateOrUpdate. */ public final class MsixPackagesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_Create.json */ /** * Sample code: MSIXPackage_Create. @@ -845,7 +852,7 @@ import com.azure.core.util.Context; /** Samples for MsixPackages Delete. */ public final class MsixPackagesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_Delete.json */ /** * Sample code: MSIXPackage_Delete. @@ -867,7 +874,7 @@ import com.azure.core.util.Context; /** Samples for MsixPackages Get. */ public final class MsixPackagesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_Get.json */ /** * Sample code: MSIXPackage_Get. @@ -889,7 +896,7 @@ import com.azure.core.util.Context; /** Samples for MsixPackages List. */ public final class MsixPackagesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_List.json */ /** * Sample code: MSIXPackage_List. @@ -898,7 +905,7 @@ public final class MsixPackagesListSamples { */ public static void mSIXPackageList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.msixPackages().list("resourceGroup1", "hostpool1", Context.NONE); + manager.msixPackages().list("resourceGroup1", "hostpool1", 10, true, 0, Context.NONE); } } ``` @@ -912,7 +919,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/preview/2021-09-03-preview/examples/MsixPackage_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_Update.json */ /** * Sample code: MSIXPackage_Update. @@ -939,7 +946,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/OperationDescription_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/OperationDescription_List.json */ /** * Sample code: OperationDescription_List. @@ -953,264 +960,164 @@ public final class OperationsListSamples { } ``` -### PrivateEndpointConnections_DeleteByHostPool - -```java -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections DeleteByHostPool. */ -public final class PrivateEndpointConnectionsDeleteByHostPoolSamples { - /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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", Context.NONE); - } -} -``` - -### PrivateEndpointConnections_DeleteByWorkspace - -```java -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections DeleteByWorkspace. */ -public final class PrivateEndpointConnectionsDeleteByWorkspaceSamples { - /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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", Context.NONE); - } -} -``` - -### PrivateEndpointConnections_GetByHostPool - -```java -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections GetByHostPool. */ -public final class PrivateEndpointConnectionsGetByHostPoolSamples { - /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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", Context.NONE); - } -} -``` - -### PrivateEndpointConnections_GetByWorkspace +### ScalingPlanPooledSchedules_Create ```java -import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import java.util.Arrays; -/** Samples for PrivateEndpointConnections GetByWorkspace. */ -public final class PrivateEndpointConnectionsGetByWorkspaceSamples { +/** Samples for ScalingPlanPooledSchedules Create. */ +public final class ScalingPlanPooledSchedulesCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateEndpointConnection_GetByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_Create.json */ /** - * Sample code: PrivateEndpointConnection_GetByWorkspace. + * Sample code: ScalingPlanPooledSchedules_Create. * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void privateEndpointConnectionGetByWorkspace( + public static void scalingPlanPooledSchedulesCreate( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager - .privateEndpointConnections() - .getByWorkspaceWithResponse( - "resourceGroup1", "workspace1", "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", Context.NONE); - } -} -``` - -### PrivateEndpointConnections_ListByHostPool - -```java -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections ListByHostPool. */ -public final class PrivateEndpointConnectionsListByHostPoolSamples { - /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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", Context.NONE); - } -} -``` - -### PrivateEndpointConnections_ListByWorkspace - -```java -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections ListByWorkspace. */ -public final class PrivateEndpointConnectionsListByWorkspaceSamples { - /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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", Context.NONE); + .scalingPlanPooledSchedules() + .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)) + .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampUpMinimumHostsPct(20) + .withRampUpCapacityThresholdPct(80) + .withPeakStartTime(new Time().withHour(8).withMinute(0)) + .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampDownStartTime(new Time().withHour(18).withMinute(0)) + .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownMinimumHostsPct(20) + .withRampDownCapacityThresholdPct(50) + .withRampDownForceLogoffUsers(true) + .withRampDownWaitTimeMinutes(30) + .withRampDownNotificationMessage("message") + .withOffPeakStartTime(new Time().withHour(20).withMinute(0)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .create(); } } ``` -### PrivateEndpointConnections_UpdateByHostPool +### ScalingPlanPooledSchedules_Delete ```java import com.azure.core.util.Context; -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 { +/** Samples for ScalingPlanPooledSchedules Delete. */ +public final class ScalingPlanPooledSchedulesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateEndpointConnection_UpdateByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_Delete.json */ /** - * Sample code: PrivateEndpointConnection_UpdateByHostPool. + * Sample code: ScalingPlanPooledSchedules_Delete. * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void privateEndpointConnectionUpdateByHostPool( + public static void scalingPlanPooledSchedulesDelete( 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")), - Context.NONE); + .scalingPlanPooledSchedules() + .deleteWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", Context.NONE); } } ``` -### PrivateEndpointConnections_UpdateByWorkspace +### ScalingPlanPooledSchedules_Get ```java import com.azure.core.util.Context; -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 { +/** Samples for ScalingPlanPooledSchedules Get. */ +public final class ScalingPlanPooledSchedulesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateEndpointConnection_UpdateByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_Get.json */ /** - * Sample code: PrivateEndpointConnection_UpdateByWorkspace. + * Sample code: ScalingPlanPooledSchedules_Get. * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void privateEndpointConnectionUpdateByWorkspace( + public static void scalingPlanPooledSchedulesGet( 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")), - Context.NONE); + .scalingPlanPooledSchedules() + .getWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", Context.NONE); } } ``` -### PrivateLinkResources_ListByHostPool +### ScalingPlanPooledSchedules_List ```java import com.azure.core.util.Context; -/** Samples for PrivateLinkResources ListByHostPool. */ -public final class PrivateLinkResourcesListByHostPoolSamples { +/** Samples for ScalingPlanPooledSchedules List. */ +public final class ScalingPlanPooledSchedulesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateLinkResources_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_List.json */ /** - * Sample code: PrivateLinkResources_ListByHostPool. + * Sample code: ScalingPlanPooledSchedules_List. * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void privateLinkResourcesListByHostPool( + public static void scalingPlanPooledSchedulesList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.privateLinkResources().listByHostPool("resourceGroup1", "hostPool1", Context.NONE); + manager.scalingPlanPooledSchedules().list("resourceGroup1", "scalingPlan1", 10, true, 0, Context.NONE); } } ``` -### PrivateLinkResources_ListByWorkspace +### ScalingPlanPooledSchedules_Update ```java import com.azure.core.util.Context; +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.Time; +import java.util.Arrays; -/** Samples for PrivateLinkResources ListByWorkspace. */ -public final class PrivateLinkResourcesListByWorkspaceSamples { +/** Samples for ScalingPlanPooledSchedules Update. */ +public final class ScalingPlanPooledSchedulesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateLinkResources_ListByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_Update.json */ /** - * Sample code: PrivateLinkResources_ListByWorkspace. + * Sample code: ScalingPlanPooledSchedules_Update. * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void privateLinkResourcesListByWorkspace( + public static void scalingPlanPooledSchedulesUpdate( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.privateLinkResources().listByWorkspace("resourceGroup1", "workspace1", Context.NONE); + ScalingPlanPooledSchedule resource = + manager + .scalingPlanPooledSchedules() + .getWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", Context.NONE) + .getValue(); + resource + .update() + .withDaysOfWeek( + Arrays + .asList( + DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY)) + .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampUpCapacityThresholdPct(80) + .withPeakStartTime(new Time().withHour(8).withMinute(0)) + .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownMinimumHostsPct(20) + .withRampDownWaitTimeMinutes(30) + .apply(); } } ``` @@ -1231,7 +1138,7 @@ import java.util.Map; /** Samples for ScalingPlans Create. */ public final class ScalingPlansCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_Create.json */ /** * Sample code: ScalingPlans_Create. @@ -1245,10 +1152,10 @@ public final class ScalingPlansCreateSamples { .define("scalingPlan1") .withRegion("centralus") .withExistingResourceGroup("resourceGroup1") + .withTimeZone("Central Standard Time") .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("Description of Scaling Plan") .withFriendlyName("Scaling Plan 1") - .withTimeZone("Central Standard Time") .withHostPoolType(ScalingHostPoolType.POOLED) .withExclusionTag("value") .withSchedules( @@ -1310,7 +1217,7 @@ import com.azure.core.util.Context; /** Samples for ScalingPlans Delete. */ public final class ScalingPlansDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_Delete.json */ /** * Sample code: ScalingPlans_Delete. @@ -1319,7 +1226,7 @@ public final class ScalingPlansDeleteSamples { */ public static void scalingPlansDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().deleteWithResponse("resourceGroup1", "scalingPlan1", Context.NONE); + manager.scalingPlans().deleteByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", Context.NONE); } } ``` @@ -1332,7 +1239,7 @@ import com.azure.core.util.Context; /** Samples for ScalingPlans GetByResourceGroup. */ public final class ScalingPlansGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_Get.json */ /** * Sample code: ScalingPlans_Get. @@ -1354,7 +1261,7 @@ import com.azure.core.util.Context; /** Samples for ScalingPlans List. */ public final class ScalingPlansListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_ListBySubscription.json */ /** * Sample code: ScalingPlans_ListBySubscription. @@ -1363,7 +1270,7 @@ public final class ScalingPlansListSamples { */ public static void scalingPlansListBySubscription( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().list(Context.NONE); + manager.scalingPlans().list(10, true, 0, Context.NONE); } } ``` @@ -1376,7 +1283,7 @@ import com.azure.core.util.Context; /** Samples for ScalingPlans ListByHostPool. */ public final class ScalingPlansListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_ListByHostPool.json */ /** * Sample code: ScalingPlan_ListByHostPool. @@ -1385,7 +1292,7 @@ public final class ScalingPlansListByHostPoolSamples { */ public static void scalingPlanListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().listByHostPool("resourceGroup1", "hostPool1", Context.NONE); + manager.scalingPlans().listByHostPool("resourceGroup1", "hostPool1", 10, true, 0, Context.NONE); } } ``` @@ -1398,7 +1305,7 @@ import com.azure.core.util.Context; /** Samples for ScalingPlans ListByResourceGroup. */ public final class ScalingPlansListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_ListByResourceGroup.json */ /** * Sample code: ScalingPlans_ListByResourceGroup. @@ -1407,7 +1314,7 @@ public final class ScalingPlansListByResourceGroupSamples { */ public static void scalingPlansListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().listByResourceGroup("resourceGroup1", Context.NONE); + manager.scalingPlans().listByResourceGroup("resourceGroup1", 10, true, 0, Context.NONE); } } ``` @@ -1421,7 +1328,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/preview/2021-09-03-preview/examples/ScalingPlan_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_Update.json */ /** * Sample code: ScalingPlans_Update. @@ -1448,7 +1355,7 @@ import com.azure.core.util.Context; /** Samples for SessionHosts Delete. */ public final class SessionHostsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/SessionHost_Delete.json */ /** * Sample code: SessionHost_Delete. @@ -1472,7 +1379,7 @@ import com.azure.core.util.Context; /** Samples for SessionHosts Get. */ public final class SessionHostsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/SessionHost_Get.json */ /** * Sample code: SessionHost_Get. @@ -1496,7 +1403,7 @@ import com.azure.core.util.Context; /** Samples for SessionHosts List. */ public final class SessionHostsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/SessionHost_List.json */ /** * Sample code: SessionHost_List. @@ -1505,7 +1412,7 @@ public final class SessionHostsListSamples { */ public static void sessionHostList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.sessionHosts().list("resourceGroup1", "hostPool1", Context.NONE); + manager.sessionHosts().list("resourceGroup1", "hostPool1", 10, true, 0, Context.NONE); } } ``` @@ -1519,7 +1426,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/preview/2021-09-03-preview/examples/SessionHost_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/SessionHost_Update.json */ /** * Sample code: SessionHost_Update. @@ -1535,7 +1442,10 @@ public final class SessionHostsUpdateSamples { "hostPool1", "sessionHost1.microsoft.com", true, - new SessionHostPatch().withAllowNewSession(true).withAssignedUser("user1@microsoft.com"), + new SessionHostPatch() + .withAllowNewSession(true) + .withAssignedUser("user1@microsoft.com") + .withFriendlyName("friendly"), Context.NONE); } } @@ -1549,7 +1459,7 @@ import com.azure.core.util.Context; /** Samples for StartMenuItems List. */ public final class StartMenuItemsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/StartMenuItem_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/StartMenuItem_List.json */ /** * Sample code: StartMenuItem_List. @@ -1558,7 +1468,7 @@ public final class StartMenuItemsListSamples { */ public static void startMenuItemList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.startMenuItems().list("resourceGroup1", "applicationGroup1", Context.NONE); + manager.startMenuItems().list("resourceGroup1", "applicationGroup1", null, null, null, Context.NONE); } } ``` @@ -1571,7 +1481,7 @@ import com.azure.core.util.Context; /** Samples for UserSessions Delete. */ public final class UserSessionsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_Delete.json */ /** * Sample code: UserSession_Delete. @@ -1595,7 +1505,7 @@ import com.azure.core.util.Context; /** Samples for UserSessions Disconnect. */ public final class UserSessionsDisconnectSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_Disconnect_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_Disconnect_Post.json */ /** * Sample code: UserSession_Disconnect_Post. @@ -1619,7 +1529,7 @@ import com.azure.core.util.Context; /** Samples for UserSessions Get. */ public final class UserSessionsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_Get.json */ /** * Sample code: UserSession_Get. @@ -1643,7 +1553,7 @@ import com.azure.core.util.Context; /** Samples for UserSessions List. */ public final class UserSessionsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_List.json */ /** * Sample code: UserSession_List. @@ -1652,7 +1562,9 @@ public final class UserSessionsListSamples { */ public static void userSessionList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.userSessions().list("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", Context.NONE); + manager + .userSessions() + .list("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", 10, true, 0, Context.NONE); } } ``` @@ -1665,7 +1577,7 @@ import com.azure.core.util.Context; /** Samples for UserSessions ListByHostPool. */ public final class UserSessionsListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_ListByHostPool.json */ /** * Sample code: UserSession_ListByHostPool. @@ -1680,6 +1592,9 @@ public final class UserSessionsListByHostPoolSamples { "resourceGroup1", "hostPool1", "userPrincipalName eq 'user1@microsoft.com' and state eq 'active'", + 10, + true, + 0, Context.NONE); } } @@ -1694,7 +1609,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/preview/2021-09-03-preview/examples/UserSession_SendMessage_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_SendMessage_Post.json */ /** * Sample code: UserSession_SendMessage_Post. @@ -1725,7 +1640,7 @@ import java.util.Map; /** Samples for Workspaces CreateOrUpdate. */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Create.json */ /** * Sample code: Workspace_Create. @@ -1766,7 +1681,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces Delete. */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Delete.json */ /** * Sample code: Workspace_Delete. @@ -1775,7 +1690,7 @@ public final class WorkspacesDeleteSamples { */ public static void workspaceDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.workspaces().deleteWithResponse("resourceGroup1", "workspace1", Context.NONE); + manager.workspaces().deleteByResourceGroupWithResponse("resourceGroup1", "workspace1", Context.NONE); } } ``` @@ -1788,7 +1703,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces GetByResourceGroup. */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Get.json */ /** * Sample code: Workspace_Get. @@ -1810,7 +1725,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces List. */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_ListBySubscription.json */ /** * Sample code: Workspace_ListBySubscription. @@ -1832,7 +1747,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces ListByResourceGroup. */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_ListByResourceGroup.json */ /** * Sample code: Workspace_ListByResourceGroup. @@ -1841,7 +1756,7 @@ public final class WorkspacesListByResourceGroupSamples { */ public static void workspaceListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.workspaces().listByResourceGroup("resourceGroup1", Context.NONE); + manager.workspaces().listByResourceGroup("resourceGroup1", 10, true, 0, Context.NONE); } } ``` @@ -1850,7 +1765,6 @@ public final class WorkspacesListByResourceGroupSamples { ```java import com.azure.core.util.Context; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.Workspace; import java.util.HashMap; import java.util.Map; @@ -1858,7 +1772,7 @@ import java.util.Map; /** Samples for Workspaces Update. */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Update.json */ /** * Sample code: Workspace_Update. @@ -1877,7 +1791,6 @@ public final class WorkspacesUpdateSamples { .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) .apply(); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml index ad08803584846..95bdb24fa4655 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml @@ -13,7 +13,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-preview-2021-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-2022-09. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/DesktopVirtualizationManager.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/DesktopVirtualizationManager.java index ab647dc2e2304..75079bef75103 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,8 +32,7 @@ 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.ScalingPlanPooledSchedulesImpl; import com.azure.resourcemanager.desktopvirtualization.implementation.ScalingPlansImpl; import com.azure.resourcemanager.desktopvirtualization.implementation.SessionHostsImpl; import com.azure.resourcemanager.desktopvirtualization.implementation.StartMenuItemsImpl; @@ -46,8 +45,7 @@ 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.ScalingPlanPooledSchedules; import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlans; import com.azure.resourcemanager.desktopvirtualization.models.SessionHosts; import com.azure.resourcemanager.desktopvirtualization.models.StartMenuItems; @@ -68,6 +66,8 @@ public final class DesktopVirtualizationManager { private ScalingPlans scalingPlans; + private ScalingPlanPooledSchedules scalingPlanPooledSchedules; + private ApplicationGroups applicationGroups; private StartMenuItems startMenuItems; @@ -86,10 +86,6 @@ public final class DesktopVirtualizationManager { private MsixImages msixImages; - private PrivateEndpointConnections privateEndpointConnections; - - private PrivateLinkResources privateLinkResources; - private final DesktopVirtualizationApiClient clientObject; private DesktopVirtualizationManager( @@ -256,7 +252,7 @@ public DesktopVirtualizationManager authenticate(TokenCredential credential, Azu .append("-") .append("com.azure.resourcemanager.desktopvirtualization") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -349,6 +345,19 @@ public ScalingPlans scalingPlans() { return scalingPlans; } + /** + * Gets the resource collection API of ScalingPlanPooledSchedules. It manages ScalingPlanPooledSchedule. + * + * @return Resource collection API of ScalingPlanPooledSchedules. + */ + public ScalingPlanPooledSchedules scalingPlanPooledSchedules() { + if (this.scalingPlanPooledSchedules == null) { + this.scalingPlanPooledSchedules = + new ScalingPlanPooledSchedulesImpl(clientObject.getScalingPlanPooledSchedules(), this); + } + return scalingPlanPooledSchedules; + } + /** * Gets the resource collection API of ApplicationGroups. It manages ApplicationGroup. * @@ -457,31 +466,6 @@ public MsixImages msixImages() { return msixImages; } - /** - * 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; - } - /** * @return Wrapped service client DesktopVirtualizationApiClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationGroupsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationGroupsClient.java index 8bcf26cb5a29c..8e1708df699cd 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationGroupsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationGroupsClient.java @@ -6,56 +6,14 @@ 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.ApplicationGroupInner; import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupPatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ApplicationGroupsClient. */ public interface ApplicationGroupsClient { - /** - * Get an application group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application 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 an application group along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String applicationGroupName); - - /** - * Get an application group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application 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 an application group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String applicationGroupName); - - /** - * Get an application group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application 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 an application group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationGroupInner getByResourceGroup(String resourceGroupName, String applicationGroupName); - /** * Get an application group. * @@ -72,20 +30,17 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String applicationGroupName, Context context); /** - * Create or update an applicationGroup. + * Get an application group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. - * @param applicationGroup Object containing ApplicationGroup 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 ApplicationGroup definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return an application group. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup); + ApplicationGroupInner getByResourceGroup(String resourceGroupName, String applicationGroupName); /** * Create or update an applicationGroup. @@ -93,14 +48,15 @@ Mono> createOrUpdateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationGroup Object containing ApplicationGroup 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 ApplicationGroup definition on successful completion of {@link Mono}. + * @return represents a ApplicationGroup definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup); + Response createOrUpdateWithResponse( + String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup, Context context); /** * Create or update an applicationGroup. @@ -117,60 +73,6 @@ Mono createOrUpdateAsync( ApplicationGroupInner createOrUpdate( String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup); - /** - * Create or update an applicationGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationGroup Object containing ApplicationGroup 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 ApplicationGroup definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup, Context context); - - /** - * Remove an applicationGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application 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 the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String applicationGroupName); - - /** - * Remove an applicationGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String applicationGroupName); - - /** - * Remove an applicationGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String applicationGroupName); - /** * Remove an applicationGroup. * @@ -186,20 +88,16 @@ Response createOrUpdateWithResponse( Response deleteWithResponse(String resourceGroupName, String applicationGroupName, Context context); /** - * Update an applicationGroup. + * Remove an applicationGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. - * @param applicationGroup Object containing ApplicationGroup 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 ApplicationGroup definition along with {@link Response} on successful completion of {@link - * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupPatch applicationGroup); + void delete(String resourceGroupName, String applicationGroupName); /** * Update an applicationGroup. @@ -207,27 +105,15 @@ Mono> updateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationGroup Object containing ApplicationGroup 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 ApplicationGroup definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupPatch applicationGroup); - - /** - * Update an applicationGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application 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 represents a ApplicationGroup definition on successful completion of {@link Mono}. + * @return represents a ApplicationGroup definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String applicationGroupName); + Response updateWithResponse( + String resourceGroupName, String applicationGroupName, ApplicationGroupPatch applicationGroup, Context context); /** * Update an applicationGroup. @@ -242,47 +128,6 @@ Mono updateAsync( @ServiceMethod(returns = ReturnType.SINGLE) ApplicationGroupInner update(String resourceGroupName, String applicationGroupName); - /** - * Update an applicationGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationGroup Object containing ApplicationGroup 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 ApplicationGroup definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String applicationGroupName, ApplicationGroupPatch applicationGroup, Context context); - - /** - * List applicationGroups. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. - * @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 applicationGroupList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter); - - /** - * List applicationGroups. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 applicationGroupList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - /** * List applicationGroups. * @@ -300,6 +145,9 @@ Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. + * @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. @@ -307,29 +155,13 @@ Response updateWithResponse( * @return applicationGroupList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context); - - /** - * List applicationGroups in subscription. - * - * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. - * @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 applicationGroupList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String filter); - - /** - * List applicationGroups in subscription. - * - * @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 applicationGroupList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); + PagedIterable listByResourceGroup( + String resourceGroupName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * List applicationGroups in subscription. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationsClient.java index c5d01a671370d..c0be6cb40fcd1 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationsClient.java @@ -6,59 +6,14 @@ 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.ApplicationInner; import com.azure.resourcemanager.desktopvirtualization.models.ApplicationPatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ApplicationsClient. */ public interface ApplicationsClient { - /** - * Get an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application 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 an application along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName); - - /** - * Get an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application 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 an application on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String applicationGroupName, String applicationName); - - /** - * Get an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application 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 an application. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInner get(String resourceGroupName, String applicationGroupName, String applicationName); - /** * Get an application. * @@ -76,52 +31,18 @@ Response getWithResponse( String resourceGroupName, String applicationGroupName, String applicationName, Context context); /** - * Create or update an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @param application Object containing Application 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 schema for Application properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application); - - /** - * Create or update an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @param application Object containing Application 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 schema for Application properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application); - - /** - * Create or update an application. + * Get an application. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. - * @param application Object containing Application 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 schema for Application properties. + * @return an application. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInner createOrUpdate( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application); + ApplicationInner get(String resourceGroupName, String applicationGroupName, String applicationName); /** * Create or update an application. @@ -145,46 +66,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Remove an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application 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 the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName); - - /** - * Remove an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String applicationGroupName, String applicationName); - - /** - * Remove an application. + * Create or update an application. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. + * @param application Object containing Application 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 schema for Application properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String applicationGroupName, String applicationName); + ApplicationInner createOrUpdate( + String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application); /** * Remove an application. @@ -203,53 +98,7 @@ Response deleteWithResponse( String resourceGroupName, String applicationGroupName, String applicationName, Context context); /** - * Update an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @param application Object containing Application 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 schema for Application properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationPatch application); - - /** - * Update an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @param application Object containing Application 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 schema for Application properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationPatch application); - - /** - * Update an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application 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 schema for Application properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String applicationGroupName, String applicationName); - - /** - * Update an application. + * Remove an application. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. @@ -257,10 +106,9 @@ Mono updateAsync( * @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 schema for Application properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInner update(String resourceGroupName, String applicationGroupName, String applicationName); + void delete(String resourceGroupName, String applicationGroupName, String applicationName); /** * Update an application. @@ -284,17 +132,18 @@ Response updateWithResponse( Context context); /** - * List applications. + * Update an application. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param applicationName The name of the application within the specified application 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 applicationList as paginated response with {@link PagedFlux}. + * @return schema for Application properties. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String applicationGroupName); + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationInner update(String resourceGroupName, String applicationGroupName, String applicationName); /** * List applications. @@ -314,6 +163,9 @@ Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -321,5 +173,11 @@ Response updateWithResponse( * @return applicationList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String applicationGroupName, Context context); + PagedIterable list( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); } 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 0acce8b6c33a3..877f5e0a06fb4 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 @@ -65,6 +65,13 @@ public interface DesktopVirtualizationApiClient { */ ScalingPlansClient getScalingPlans(); + /** + * Gets the ScalingPlanPooledSchedulesClient object to access its operations. + * + * @return the ScalingPlanPooledSchedulesClient object. + */ + ScalingPlanPooledSchedulesClient getScalingPlanPooledSchedules(); + /** * Gets the ApplicationGroupsClient object to access its operations. * @@ -127,18 +134,4 @@ public interface DesktopVirtualizationApiClient { * @return the MsixImagesClient object. */ MsixImagesClient getMsixImages(); - - /** - * 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(); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopsClient.java index e3f6e830867ba..4e7b23e242bb8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopsClient.java @@ -6,59 +6,14 @@ 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.DesktopInner; import com.azure.resourcemanager.desktopvirtualization.models.DesktopPatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in DesktopsClient. */ public interface DesktopsClient { - /** - * Get a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop 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 desktop along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String applicationGroupName, String desktopName); - - /** - * Get a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop 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 desktop on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String applicationGroupName, String desktopName); - - /** - * Get a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop 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 desktop. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DesktopInner get(String resourceGroupName, String applicationGroupName, String desktopName); - /** * Get a desktop. * @@ -76,53 +31,7 @@ Response getWithResponse( String resourceGroupName, String applicationGroupName, String desktopName, Context context); /** - * Update a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop group. - * @param desktop Object containing Desktop 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 schema for Desktop properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String applicationGroupName, String desktopName, DesktopPatch desktop); - - /** - * Update a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop group. - * @param desktop Object containing Desktop 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 schema for Desktop properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String applicationGroupName, String desktopName, DesktopPatch desktop); - - /** - * Update a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop 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 schema for Desktop properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String applicationGroupName, String desktopName); - - /** - * Update a desktop. + * Get a desktop. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. @@ -130,10 +39,10 @@ Mono updateAsync( * @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 schema for Desktop properties. + * @return a desktop. */ @ServiceMethod(returns = ReturnType.SINGLE) - DesktopInner update(String resourceGroupName, String applicationGroupName, String desktopName); + DesktopInner get(String resourceGroupName, String applicationGroupName, String desktopName); /** * Update a desktop. @@ -157,17 +66,18 @@ Response updateWithResponse( Context context); /** - * List desktops. + * Update a desktop. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param desktopName The name of the desktop within the specified desktop 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 desktopList as paginated response with {@link PagedFlux}. + * @return schema for Desktop properties. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String applicationGroupName); + @ServiceMethod(returns = ReturnType.SINGLE) + DesktopInner update(String resourceGroupName, String applicationGroupName, String desktopName); /** * List desktops. @@ -187,6 +97,9 @@ Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -194,5 +107,11 @@ Response updateWithResponse( * @return desktopList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String applicationGroupName, Context context); + PagedIterable list( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/HostPoolsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/HostPoolsClient.java index 10ae0b09fbf86..79fd7c0ff27f3 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/HostPoolsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/HostPoolsClient.java @@ -6,56 +6,15 @@ 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.HostPoolInner; import com.azure.resourcemanager.desktopvirtualization.fluent.models.RegistrationInfoInner; import com.azure.resourcemanager.desktopvirtualization.models.HostPoolPatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in HostPoolsClient. */ public interface HostPoolsClient { - /** - * Get a host pool. - * - * @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 host pool along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String hostPoolName); - - /** - * Get a host pool. - * - * @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 host pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String hostPoolName); - - /** - * Get a host pool. - * - * @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 host pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - HostPoolInner getByResourceGroup(String resourceGroupName, String hostPoolName); - /** * Get a host pool. * @@ -72,47 +31,17 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String hostPoolName, Context context); /** - * Create or update a host pool. - * - * @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 hostPool Object containing HostPool 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 HostPool definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String hostPoolName, HostPoolInner hostPool); - - /** - * Create or update a host pool. - * - * @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 hostPool Object containing HostPool 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 HostPool definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String hostPoolName, HostPoolInner hostPool); - - /** - * Create or update a host pool. + * Get a host pool. * * @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 hostPool Object containing HostPool 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 HostPool definition. + * @return a host pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - HostPoolInner createOrUpdate(String resourceGroupName, String hostPoolName, HostPoolInner hostPool); + HostPoolInner getByResourceGroup(String resourceGroupName, String hostPoolName); /** * Create or update a host pool. @@ -131,57 +60,18 @@ Response createOrUpdateWithResponse( String resourceGroupName, String hostPoolName, HostPoolInner hostPool, Context context); /** - * Remove a host pool. - * - * @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 force Force flag to delete sessionHost. - * @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 hostPoolName, Boolean force); - - /** - * Remove a host pool. - * - * @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 force Force flag to delete sessionHost. - * @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 hostPoolName, Boolean force); - - /** - * Remove a host pool. - * - * @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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String hostPoolName); - - /** - * Remove a host pool. + * Create or update a host pool. * * @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 hostPool Object containing HostPool 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 HostPool definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String hostPoolName); + HostPoolInner createOrUpdate(String resourceGroupName, String hostPoolName, HostPoolInner hostPool); /** * Remove a host pool. @@ -199,19 +89,16 @@ Response createOrUpdateWithResponse( Response deleteWithResponse(String resourceGroupName, String hostPoolName, Boolean force, Context context); /** - * Update a host pool. + * Remove a host pool. * * @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 hostPool Object containing HostPool 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 HostPool definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String hostPoolName, HostPoolPatch hostPool); + void delete(String resourceGroupName, String hostPoolName); /** * Update a host pool. @@ -219,26 +106,15 @@ Mono> updateWithResponseAsync( * @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 hostPool Object containing HostPool 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 HostPool definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String hostPoolName, HostPoolPatch hostPool); - - /** - * Update a host pool. - * - * @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 represents a HostPool definition on successful completion of {@link Mono}. + * @return represents a HostPool definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String hostPoolName); + Response updateWithResponse( + String resourceGroupName, String hostPoolName, HostPoolPatch hostPool, Context context); /** * Update a host pool. @@ -253,34 +129,6 @@ Mono> updateWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) HostPoolInner update(String resourceGroupName, String hostPoolName); - /** - * Update a host pool. - * - * @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 hostPool Object containing HostPool 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 HostPool definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String hostPoolName, HostPoolPatch hostPool, Context context); - - /** - * List hostPools. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 hostPoolList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - /** * List hostPools. * @@ -297,6 +145,9 @@ Response updateWithResponse( * List hostPools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. @@ -304,17 +155,8 @@ Response updateWithResponse( * @return hostPoolList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List hostPools in subscription. - * - * @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 hostPoolList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); + PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * List hostPools in subscription. @@ -329,6 +171,9 @@ Response updateWithResponse( /** * List hostPools in subscription. * + * @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. @@ -336,35 +181,22 @@ Response updateWithResponse( * @return hostPoolList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Registration token of the host pool. - * - * @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 represents a RegistrationInfo definition along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> retrieveRegistrationTokenWithResponseAsync( - String resourceGroupName, String hostPoolName); + PagedIterable list(Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * Registration token of the host pool. * * @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 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 RegistrationInfo definition on successful completion of {@link Mono}. + * @return represents a RegistrationInfo definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono retrieveRegistrationTokenAsync(String resourceGroupName, String hostPoolName); + Response retrieveRegistrationTokenWithResponse( + String resourceGroupName, String hostPoolName, Context context); /** * Registration token of the host pool. @@ -378,19 +210,4 @@ Mono> retrieveRegistrationTokenWithResponseAsync */ @ServiceMethod(returns = ReturnType.SINGLE) RegistrationInfoInner retrieveRegistrationToken(String resourceGroupName, String hostPoolName); - - /** - * Registration token of the host pool. - * - * @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 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 RegistrationInfo definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response retrieveRegistrationTokenWithResponse( - String resourceGroupName, String hostPoolName, Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixImagesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixImagesClient.java index 2920e831cb76f..0877812b7daad 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixImagesClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixImagesClient.java @@ -6,7 +6,6 @@ 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.ExpandMsixImageInner; @@ -14,21 +13,6 @@ /** An instance of this class provides access to all the operations defined in MsixImagesClient. */ public interface MsixImagesClient { - /** - * Expands and Lists MSIX packages in an Image, given the Image Path. - * - * @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 msixImageUri Object containing URI to MSIX Image. - * @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 expandMsixImageList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux expandAsync( - String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri); - /** * Expands and Lists MSIX packages in an Image, given the Image Path. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixPackagesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixPackagesClient.java index c0b05592eeace..3cc286f60e030 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixPackagesClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixPackagesClient.java @@ -6,59 +6,14 @@ 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.MsixPackageInner; import com.azure.resourcemanager.desktopvirtualization.models.MsixPackagePatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in MsixPackagesClient. */ public interface MsixPackagesClient { - /** - * Get a msixpackage. - * - * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @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 msixpackage along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName); - - /** - * Get a msixpackage. - * - * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @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 msixpackage on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName); - - /** - * Get a msixpackage. - * - * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @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 msixpackage. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MsixPackageInner get(String resourceGroupName, String hostPoolName, String msixPackageFullName); - /** * Get a msixpackage. * @@ -76,52 +31,18 @@ Response getWithResponse( String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context); /** - * Create or update a MSIX package. - * - * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param msixPackage Object containing MSIX Package 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 schema for MSIX Package properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage); - - /** - * Create or update a MSIX package. - * - * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param msixPackage Object containing MSIX Package 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 schema for MSIX Package properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage); - - /** - * Create or update a MSIX package. + * Get a msixpackage. * * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param msixPackage Object containing MSIX Package 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 schema for MSIX Package properties. + * @return a msixpackage. */ @ServiceMethod(returns = ReturnType.SINGLE) - MsixPackageInner createOrUpdate( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage); + MsixPackageInner get(String resourceGroupName, String hostPoolName, String msixPackageFullName); /** * Create or update a MSIX package. @@ -145,46 +66,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Remove an MSIX Package. - * - * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @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 hostPoolName, String msixPackageFullName); - - /** - * Remove an MSIX Package. - * - * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @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 hostPoolName, String msixPackageFullName); - - /** - * Remove an MSIX Package. + * Create or update a MSIX package. * * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. + * @param msixPackage Object containing MSIX Package 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 schema for MSIX Package properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String hostPoolName, String msixPackageFullName); + MsixPackageInner createOrUpdate( + String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage); /** * Remove an MSIX Package. @@ -203,53 +98,7 @@ Response deleteWithResponse( String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context); /** - * Update an MSIX Package. - * - * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param msixPackage Object containing MSIX Package 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 schema for MSIX Package properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackagePatch msixPackage); - - /** - * Update an MSIX Package. - * - * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param msixPackage Object containing MSIX Package 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 schema for MSIX Package properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackagePatch msixPackage); - - /** - * Update an MSIX Package. - * - * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @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 schema for MSIX Package properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName); - - /** - * Update an MSIX Package. + * Remove an MSIX Package. * * @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. @@ -257,10 +106,9 @@ Mono updateAsync( * @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 schema for MSIX Package properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - MsixPackageInner update(String resourceGroupName, String hostPoolName, String msixPackageFullName); + void delete(String resourceGroupName, String hostPoolName, String msixPackageFullName); /** * Update an MSIX Package. @@ -284,17 +132,18 @@ Response updateWithResponse( Context context); /** - * List MSIX packages in hostpool. + * Update an MSIX Package. * * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. * @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 msixPackageList as paginated response with {@link PagedFlux}. + * @return schema for MSIX Package properties. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String hostPoolName); + @ServiceMethod(returns = ReturnType.SINGLE) + MsixPackageInner update(String resourceGroupName, String hostPoolName, String msixPackageFullName); /** * List MSIX packages in hostpool. @@ -314,6 +163,9 @@ Response updateWithResponse( * * @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. @@ -321,5 +173,11 @@ Response updateWithResponse( * @return msixPackageList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String hostPoolName, Context context); + PagedIterable list( + 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/OperationsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/OperationsClient.java index fbeb8668954a1..55f6fa3f0751b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/OperationsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/OperationsClient.java @@ -6,23 +6,12 @@ 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.ResourceProviderOperationInner; /** An instance of this class provides access to all the operations defined in OperationsClient. */ public interface OperationsClient { - /** - * List all of the available operations the Desktop Virtualization resource provider supports. - * - * @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 result of the request to list operations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - /** * List all of the available operations the Desktop Virtualization resource provider supports. * 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 deleted file mode 100644 index 7fdef13cbec42..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateEndpointConnectionsClient.java +++ /dev/null @@ -1,532 +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.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 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 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, 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. - * @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); - - /** - * 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); - - /** - * 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. - * @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); - - /** - * 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); - - /** - * 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. - * @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); - - /** - * 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); - - /** - * 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. - * @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); - - /** - * 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); - - /** - * 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. - * @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); - - /** - * 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); - - /** - * 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. - * @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); - - /** - * 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); -} 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 deleted file mode 100644 index 859e673b4238f..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateLinkResourcesClient.java +++ /dev/null @@ -1,97 +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.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 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 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, 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. - * @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 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, Context context); -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPooledSchedulesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPooledSchedulesClient.java new file mode 100644 index 0000000000000..9dd370fa9bb95 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPooledSchedulesClient.java @@ -0,0 +1,188 @@ +// 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.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleInner; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedulePatch; + +/** An instance of this class provides access to all the operations defined in ScalingPlanPooledSchedulesClient. */ +public interface ScalingPlanPooledSchedulesClient { + /** + * Get a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context); + + /** + * Get a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScalingPlanPooledScheduleInner get( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * Create or update a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponse( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner scalingPlanSchedule, + Context context); + + /** + * Create or update a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScalingPlanPooledScheduleInner create( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner scalingPlanSchedule); + + /** + * Remove a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledSchedulePatch scalingPlanSchedule, + Context context); + + /** + * Update a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScalingPlanPooledScheduleInner update( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * List ScalingPlanPooledSchedules. + * + * @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 scalingPlanPooledScheduleList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String scalingPlanName); + + /** + * List ScalingPlanPooledSchedules. + * + * @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 scalingPlanPooledScheduleList 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/ScalingPlansClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlansClient.java index d47902f9df8b1..7cb33ef84deb1 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlansClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlansClient.java @@ -6,56 +6,14 @@ 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.ScalingPlanInner; import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ScalingPlansClient. */ public interface ScalingPlansClient { - /** - * Get a scaling plan. - * - * @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 a scaling plan along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String scalingPlanName); - - /** - * Get a scaling plan. - * - * @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 a scaling plan on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String scalingPlanName); - - /** - * Get a scaling plan. - * - * @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 a scaling plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScalingPlanInner getByResourceGroup(String resourceGroupName, String scalingPlanName); - /** * Get a scaling plan. * @@ -72,47 +30,17 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String scalingPlanName, Context context); /** - * Create or update a scaling plan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scalingPlanName The name of the scaling plan. - * @param scalingPlan Object containing scaling plan 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 scalingPlan along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createWithResponseAsync( - String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan); - - /** - * Create or update a scaling plan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scalingPlanName The name of the scaling plan. - * @param scalingPlan Object containing scaling plan 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 scalingPlan on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan); - - /** - * Create or update a scaling plan. + * Get a scaling plan. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. - * @param scalingPlan Object containing scaling plan 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 scalingPlan. + * @return a scaling plan. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScalingPlanInner create(String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan); + ScalingPlanInner getByResourceGroup(String resourceGroupName, String scalingPlanName); /** * Create or update a scaling plan. @@ -131,42 +59,18 @@ Response createWithResponse( String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan, Context context); /** - * Remove a scaling plan. - * - * @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 the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String scalingPlanName); - - /** - * Remove a scaling plan. - * - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String scalingPlanName); - - /** - * Remove a scaling plan. + * Create or update a scaling plan. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. + * @param scalingPlan Object containing scaling plan 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 scalingPlan. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String scalingPlanName); + ScalingPlanInner create(String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan); /** * Remove a scaling plan. @@ -183,19 +87,16 @@ Response createWithResponse( Response deleteWithResponse(String resourceGroupName, String scalingPlanName, Context context); /** - * Update a scaling plan. + * Remove a scaling plan. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. - * @param scalingPlan Object containing scaling plan 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 scalingPlan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan); + void delete(String resourceGroupName, String scalingPlanName); /** * Update a scaling plan. @@ -203,26 +104,15 @@ Mono> updateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlan Object containing scaling plan 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 scalingPlan on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan); - - /** - * Update a scaling plan. - * - * @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 scalingPlan on successful completion of {@link Mono}. + * @return scalingPlan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String scalingPlanName); + Response updateWithResponse( + String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan, Context context); /** * Update a scaling plan. @@ -237,34 +127,6 @@ Mono> updateWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) ScalingPlanInner update(String resourceGroupName, String scalingPlanName); - /** - * Update a scaling plan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scalingPlanName The name of the scaling plan. - * @param scalingPlan Object containing scaling plan 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 scalingPlan along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan, Context context); - - /** - * List scaling plans. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 scalingPlanList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - /** * List scaling plans. * @@ -281,6 +143,9 @@ Response updateWithResponse( * List scaling plans. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. @@ -288,17 +153,8 @@ Response updateWithResponse( * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List scaling plans in subscription. - * - * @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 scalingPlanList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); + PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * List scaling plans in subscription. @@ -313,6 +169,9 @@ Response updateWithResponse( /** * List scaling plans in subscription. * + * @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. @@ -320,20 +179,7 @@ Response updateWithResponse( * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * List scaling plan 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 scalingPlanList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName); + PagedIterable list(Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * List scaling plan associated with hostpool. @@ -353,6 +199,9 @@ Response updateWithResponse( * * @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. @@ -360,5 +209,11 @@ Response updateWithResponse( * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByHostPool(String resourceGroupName, String hostPoolName, Context context); + 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/SessionHostsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/SessionHostsClient.java index 13d7096863e31..06a04a3313234 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/SessionHostsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/SessionHostsClient.java @@ -6,59 +6,14 @@ 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.SessionHostInner; import com.azure.resourcemanager.desktopvirtualization.models.SessionHostPatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in SessionHostsClient. */ public interface SessionHostsClient { - /** - * Get a session host. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @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 session host along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname); - - /** - * Get a session host. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @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 session host on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String hostPoolName, String sessionHostname); - - /** - * Get a session host. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @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 session host. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SessionHostInner get(String resourceGroupName, String hostPoolName, String sessionHostname); - /** * Get a session host. * @@ -76,52 +31,7 @@ Response getWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, Context context); /** - * Remove a SessionHost. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to force sessionHost deletion even when userSession exists. - * @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 hostPoolName, String sessionHostname, Boolean force); - - /** - * Remove a SessionHost. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to force sessionHost deletion even when userSession exists. - * @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 hostPoolName, String sessionHostname, Boolean force); - - /** - * Remove a SessionHost. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @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 hostPoolName, String sessionHostname); - - /** - * Remove a SessionHost. + * Get a session host. * * @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. @@ -129,9 +39,10 @@ Mono> deleteWithResponseAsync( * @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 session host. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String hostPoolName, String sessionHostname); + SessionHostInner get(String resourceGroupName, String hostPoolName, String sessionHostname); /** * Remove a SessionHost. @@ -151,63 +62,7 @@ Response deleteWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force, Context context); /** - * Update a session host. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to update assign, unassign or reassign personal desktop. - * @param sessionHost Object containing SessionHost 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 SessionHost definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Boolean force, - SessionHostPatch sessionHost); - - /** - * Update a session host. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to update assign, unassign or reassign personal desktop. - * @param sessionHost Object containing SessionHost 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 SessionHost definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Boolean force, - SessionHostPatch sessionHost); - - /** - * Update a session host. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @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 SessionHost definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String hostPoolName, String sessionHostname); - - /** - * Update a session host. + * Remove a SessionHost. * * @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. @@ -215,10 +70,9 @@ Mono updateAsync( * @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 SessionHost definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - SessionHostInner update(String resourceGroupName, String hostPoolName, String sessionHostname); + void delete(String resourceGroupName, String hostPoolName, String sessionHostname); /** * Update a session host. @@ -244,17 +98,18 @@ Response updateWithResponse( Context context); /** - * List sessionHosts. + * Update a session host. * * @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 sessionHostname The name of the session host within the specified host pool. * @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 sessionHostList as paginated response with {@link PagedFlux}. + * @return represents a SessionHost definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String hostPoolName); + @ServiceMethod(returns = ReturnType.SINGLE) + SessionHostInner update(String resourceGroupName, String hostPoolName, String sessionHostname); /** * List sessionHosts. @@ -274,6 +129,9 @@ Response updateWithResponse( * * @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. @@ -281,5 +139,11 @@ Response updateWithResponse( * @return sessionHostList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String hostPoolName, Context context); + PagedIterable list( + 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/StartMenuItemsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/StartMenuItemsClient.java index ec4a8949e9c49..3ea0b7969ea57 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/StartMenuItemsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/StartMenuItemsClient.java @@ -6,26 +6,12 @@ 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.StartMenuItemInner; /** An instance of this class provides access to all the operations defined in StartMenuItemsClient. */ public interface StartMenuItemsClient { - /** - * List start menu items in the given application group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application 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 startMenuItemList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String applicationGroupName); - /** * List start menu items in the given application group. * @@ -44,6 +30,9 @@ public interface StartMenuItemsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -51,5 +40,11 @@ public interface StartMenuItemsClient { * @return startMenuItemList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String applicationGroupName, Context context); + PagedIterable list( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/UserSessionsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/UserSessionsClient.java index 9011c3d00861d..4c3fe545e573b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/UserSessionsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/UserSessionsClient.java @@ -6,43 +6,14 @@ 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.UserSessionInner; import com.azure.resourcemanager.desktopvirtualization.models.SendMessage; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in UserSessionsClient. */ public interface UserSessionsClient { - /** - * List userSessions. - * - * @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 filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. - * @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 userSessionList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName, String filter); - - /** - * List userSessions. - * - * @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 userSessionList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName); - /** * List userSessions. * @@ -62,6 +33,9 @@ public interface UserSessionsClient { * @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 filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. + * @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. @@ -70,54 +44,13 @@ public interface UserSessionsClient { */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName, String filter, Context context); - - /** - * Get a userSession. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @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 userSession along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); - - /** - * Get a userSession. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @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 userSession on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); - - /** - * Get a userSession. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @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 userSession. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - UserSessionInner get(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + String resourceGroupName, + String hostPoolName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * Get a userSession. @@ -137,56 +70,7 @@ Response getWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context); /** - * Remove a userSession. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @param force Force flag to login off userSession. - * @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 hostPoolName, String sessionHostname, String userSessionId, Boolean force); - - /** - * Remove a userSession. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @param force Force flag to login off userSession. - * @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 hostPoolName, String sessionHostname, String userSessionId, Boolean force); - - /** - * Remove a userSession. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @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 hostPoolName, String sessionHostname, String userSessionId); - - /** - * Remove a userSession. + * Get a userSession. * * @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. @@ -195,9 +79,10 @@ Mono deleteAsync( * @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 userSession. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + UserSessionInner get(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); /** * Remove a userSession. @@ -223,18 +108,18 @@ Response deleteWithResponse( Context context); /** - * List userSessions. + * Remove a userSession. * * @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 sessionHostname The name of the session host within the specified host pool. + * @param userSessionId The name of the user session within the specified session host. * @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 userSessionList as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String hostPoolName, String sessionHostname); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); /** * List userSessions. @@ -256,6 +141,9 @@ Response deleteWithResponse( * @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 sessionHostname The name of the session host within the specified host pool. + * @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. @@ -264,53 +152,13 @@ Response deleteWithResponse( */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context); - - /** - * Disconnect a userSession. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @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> disconnectWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); - - /** - * Disconnect a userSession. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @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 disconnectAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); - - /** - * Disconnect a userSession. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @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 disconnect(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * Disconnect a userSession. @@ -330,25 +178,18 @@ Response disconnectWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context); /** - * Send a message to a user. + * Disconnect a userSession. * * @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 sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. - * @param sendMessage Object containing message includes title and message body. * @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> sendMessageWithResponseAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - SendMessage sendMessage); + void disconnect(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); /** * Send a message to a user. @@ -358,34 +199,20 @@ Mono> sendMessageWithResponseAsync( * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. * @param sendMessage Object containing message includes title and message body. + * @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 {@link Mono} that completes when a successful response is received. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono sendMessageAsync( + Response sendMessageWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, - SendMessage sendMessage); - - /** - * Send a message to a user. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @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 sendMessageAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + SendMessage sendMessage, + Context context); /** * Send a message to a user. @@ -400,27 +227,4 @@ Mono sendMessageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) void sendMessage(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); - - /** - * Send a message to a user. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @param sendMessage Object containing message includes title and message body. - * @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 sendMessageWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - SendMessage sendMessage, - Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/WorkspacesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/WorkspacesClient.java index 0ef2fecc1512c..cf03780dc2717 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/WorkspacesClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/WorkspacesClient.java @@ -6,55 +6,14 @@ 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.WorkspaceInner; import com.azure.resourcemanager.desktopvirtualization.models.WorkspacePatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in WorkspacesClient. */ public interface WorkspacesClient { - /** - * Get a 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 workspace along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String workspaceName); - - /** - * Get a 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 workspace on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName); - - /** - * Get a 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 workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); - /** * Get a workspace. * @@ -71,47 +30,17 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String workspaceName, Context context); /** - * Create or update a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param workspace Object containing Workspace 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 Workspace definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspaceInner workspace); - - /** - * Create or update a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param workspace Object containing Workspace 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 Workspace definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, WorkspaceInner workspace); - - /** - * Create or update a workspace. + * Get a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param workspace Object containing Workspace 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 Workspace definition. + * @return a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner workspace); + WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); /** * Create or update a workspace. @@ -130,42 +59,18 @@ Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, WorkspaceInner workspace, Context context); /** - * Remove a 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 the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName); - - /** - * Remove a 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String workspaceName); - - /** - * Remove a workspace. + * Create or update a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param workspace Object containing Workspace 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 Workspace definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName); + WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner workspace); /** * Remove a workspace. @@ -182,19 +87,16 @@ Response createOrUpdateWithResponse( Response deleteWithResponse(String resourceGroupName, String workspaceName, Context context); /** - * Update a workspace. + * Remove a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param workspace Object containing Workspace 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 Workspace definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspacePatch workspace); + void delete(String resourceGroupName, String workspaceName); /** * Update a workspace. @@ -202,26 +104,15 @@ Mono> updateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param workspace Object containing Workspace 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 Workspace definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String workspaceName, WorkspacePatch workspace); - - /** - * Update a 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 represents a Workspace definition on successful completion of {@link Mono}. + * @return represents a Workspace definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String workspaceName); + Response updateWithResponse( + String resourceGroupName, String workspaceName, WorkspacePatch workspace, Context context); /** * Update a workspace. @@ -236,34 +127,6 @@ Mono> updateWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) WorkspaceInner update(String resourceGroupName, String workspaceName); - /** - * Update a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param workspace Object containing Workspace 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 Workspace definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String workspaceName, WorkspacePatch workspace, Context context); - - /** - * List workspaces. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @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 workspaceList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - /** * List workspaces. * @@ -280,6 +143,9 @@ Response updateWithResponse( * List workspaces. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. @@ -287,17 +153,8 @@ Response updateWithResponse( * @return workspaceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List workspaces in subscription. - * - * @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 workspaceList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); + PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * List workspaces in subscription. 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 def9927163bae..da8dba500011f 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 @@ -8,7 +8,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupType; -import com.azure.resourcemanager.desktopvirtualization.models.MigrationRequestProperties; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySet; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan; @@ -31,6 +30,10 @@ public final class ApplicationGroupInner extends ResourceModelWithAllowedPropert @JsonProperty(value = "properties", required = true) private ApplicationGroupProperties innerProperties = new ApplicationGroupProperties(); + /** Creates an instance of ApplicationGroupInner class. */ + public ApplicationGroupInner() { + } + /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * @@ -208,29 +211,6 @@ public ApplicationGroupInner withApplicationGroupType(ApplicationGroupType appli return this; } - /** - * Get the migrationRequest property: The registration info of HostPool. - * - * @return the migrationRequest value. - */ - public MigrationRequestProperties migrationRequest() { - return this.innerProperties() == null ? null : this.innerProperties().migrationRequest(); - } - - /** - * Set the migrationRequest property: The registration info of HostPool. - * - * @param migrationRequest the migrationRequest value to set. - * @return the ApplicationGroupInner object itself. - */ - public ApplicationGroupInner withMigrationRequest(MigrationRequestProperties migrationRequest) { - if (this.innerProperties() == null) { - this.innerProperties = new ApplicationGroupProperties(); - } - this.innerProperties().withMigrationRequest(migrationRequest); - return this; - } - /** * Get the cloudPcResource property: Is cloud pc resource. * 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 9b8fb6659f2ab..e3d19f6baf5fb 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,10 @@ public final class ApplicationGroupPatchProperties { @JsonProperty(value = "friendlyName") private String friendlyName; + /** Creates an instance of ApplicationGroupPatchProperties class. */ + public ApplicationGroupPatchProperties() { + } + /** * Get the description property: Description of ApplicationGroup. * 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 d7d32cab484d5..4973473feaaae 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 @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupType; -import com.azure.resourcemanager.desktopvirtualization.models.MigrationRequestProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Schema for ApplicationGroup properties. */ @@ -49,18 +48,16 @@ public final class ApplicationGroupProperties { @JsonProperty(value = "applicationGroupType", required = true) private ApplicationGroupType applicationGroupType; - /* - * The registration info of HostPool. - */ - @JsonProperty(value = "migrationRequest") - private MigrationRequestProperties migrationRequest; - /* * Is cloud pc resource. */ @JsonProperty(value = "cloudPcResource", access = JsonProperty.Access.WRITE_ONLY) private Boolean cloudPcResource; + /** Creates an instance of ApplicationGroupProperties class. */ + public ApplicationGroupProperties() { + } + /** * Get the objectId property: ObjectId of ApplicationGroup. (internal use). * @@ -159,26 +156,6 @@ public ApplicationGroupProperties withApplicationGroupType(ApplicationGroupType return this; } - /** - * Get the migrationRequest property: The registration info of HostPool. - * - * @return the migrationRequest value. - */ - public MigrationRequestProperties migrationRequest() { - return this.migrationRequest; - } - - /** - * Set the migrationRequest property: The registration info of HostPool. - * - * @param migrationRequest the migrationRequest value to set. - * @return the ApplicationGroupProperties object itself. - */ - public ApplicationGroupProperties withMigrationRequest(MigrationRequestProperties migrationRequest) { - this.migrationRequest = migrationRequest; - return this; - } - /** * Get the cloudPcResource property: Is cloud pc resource. * @@ -206,9 +183,6 @@ public void validate() { new IllegalArgumentException( "Missing required property applicationGroupType in model ApplicationGroupProperties")); } - if (migrationRequest() != null) { - migrationRequest().validate(); - } } private static final ClientLogger LOGGER = new ClientLogger(ApplicationGroupProperties.class); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationInner.java index 51da15bc850ec..95a3eee8def3e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationInner.java @@ -27,6 +27,10 @@ public final class ApplicationInner extends ProxyResource { @JsonProperty(value = "properties", required = true) private ApplicationProperties innerProperties = new ApplicationProperties(); + /** Creates an instance of ApplicationInner class. */ + public ApplicationInner() { + } + /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationPatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationPatchProperties.java index 96a612ca0d1d8..48003f018adbe 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationPatchProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationPatchProperties.java @@ -31,9 +31,8 @@ public final class ApplicationPatchProperties { private String filePath; /* - * Specifies whether this published application can be launched with - * command line arguments provided by the client, command line arguments - * specified at publish time, or no command line arguments at all. + * Specifies whether this published application can be launched with command line arguments provided by the client, + * command line arguments specified at publish time, or no command line arguments at all. */ @JsonProperty(value = "commandLineSetting") private CommandLineSetting commandLineSetting; @@ -45,8 +44,7 @@ public final class ApplicationPatchProperties { private String commandLineArguments; /* - * Specifies whether to show the RemoteApp program in the RD Web Access - * server. + * Specifies whether to show the RemoteApp program in the RD Web Access server. */ @JsonProperty(value = "showInPortal") private Boolean showInPortal; @@ -81,6 +79,10 @@ public final class ApplicationPatchProperties { @JsonProperty(value = "applicationType") private RemoteApplicationType applicationType; + /** Creates an instance of ApplicationPatchProperties class. */ + public ApplicationPatchProperties() { + } + /** * Get the description property: Description of Application. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationProperties.java index 410022ce35137..cb168d91b0078 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationProperties.java @@ -57,9 +57,8 @@ public final class ApplicationProperties { private RemoteApplicationType applicationType; /* - * Specifies whether this published application can be launched with - * command line arguments provided by the client, command line arguments - * specified at publish time, or no command line arguments at all. + * Specifies whether this published application can be launched with command line arguments provided by the client, + * command line arguments specified at publish time, or no command line arguments at all. */ @JsonProperty(value = "commandLineSetting", required = true) private CommandLineSetting commandLineSetting; @@ -71,8 +70,7 @@ public final class ApplicationProperties { private String commandLineArguments; /* - * Specifies whether to show the RemoteApp program in the RD Web Access - * server. + * Specifies whether to show the RemoteApp program in the RD Web Access server. */ @JsonProperty(value = "showInPortal") private Boolean showInPortal; @@ -101,6 +99,10 @@ public final class ApplicationProperties { @JsonProperty(value = "iconContent", access = JsonProperty.Access.WRITE_ONLY) private byte[] iconContent; + /** Creates an instance of ApplicationProperties class. */ + public ApplicationProperties() { + } + /** * Get the objectId property: ObjectId of Application. (internal use). * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopInner.java index f9713b4ca4996..664d9527b2b68 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopInner.java @@ -24,6 +24,10 @@ public final class DesktopInner extends ProxyResource { @JsonProperty(value = "properties") private DesktopProperties innerProperties; + /** Creates an instance of DesktopInner class. */ + public DesktopInner() { + } + /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopPatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopPatchProperties.java index 121ced400e713..5b2861930ca8b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopPatchProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopPatchProperties.java @@ -22,6 +22,10 @@ public final class DesktopPatchProperties { @JsonProperty(value = "friendlyName") private String friendlyName; + /** Creates an instance of DesktopPatchProperties class. */ + public DesktopPatchProperties() { + } + /** * Get the description property: Description of Desktop. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopProperties.java index 6d9dce54e23c0..de310b145b675 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopProperties.java @@ -41,6 +41,10 @@ public final class DesktopProperties { @JsonProperty(value = "iconContent", access = JsonProperty.Access.WRITE_ONLY) private byte[] iconContent; + /** Creates an instance of DesktopProperties class. */ + public DesktopProperties() { + } + /** * Get the objectId property: ObjectId of Desktop. (internal use). * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ExpandMsixImageInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ExpandMsixImageInner.java index 599dfbe2604f2..b58ac6261582f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ExpandMsixImageInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ExpandMsixImageInner.java @@ -21,6 +21,10 @@ public final class ExpandMsixImageInner extends ProxyResource { @JsonProperty(value = "properties") private ExpandMsixImageProperties innerProperties; + /** Creates an instance of ExpandMsixImageInner class. */ + public ExpandMsixImageInner() { + } + /** * Get the innerProperties property: Detailed properties for ExpandMsixImage. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ExpandMsixImageProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ExpandMsixImageProperties.java index 0c724762e5f69..cb3cd7bf906ec 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ExpandMsixImageProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ExpandMsixImageProperties.java @@ -33,8 +33,7 @@ public final class ExpandMsixImageProperties { private String packageName; /* - * Package Family Name from appxmanifest.xml. Contains Package Name and - * Publisher name. + * Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. */ @JsonProperty(value = "packageFamilyName") private String packageFamilyName; @@ -93,6 +92,10 @@ public final class ExpandMsixImageProperties { @JsonProperty(value = "packageApplications") private List packageApplications; + /** Creates an instance of ExpandMsixImageProperties class. */ + public ExpandMsixImageProperties() { + } + /** * Get the packageAlias property: Alias of MSIX Package. * 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 0cc1d2125cbd5..07a1c567f5979 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 @@ -7,12 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.SystemData; 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.LoadBalancerType; -import com.azure.resourcemanager.desktopvirtualization.models.MigrationRequestProperties; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; -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; @@ -37,6 +36,10 @@ public final class HostPoolInner extends ResourceModelWithAllowedPropertySet { @JsonProperty(value = "properties", required = true) private HostPoolPropertiesInner innerProperties = new HostPoolPropertiesInner(); + /** Creates an instance of HostPoolInner class. */ + public HostPoolInner() { + } + /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * @@ -518,29 +521,6 @@ public HostPoolInner withStartVMOnConnect(Boolean startVMOnConnect) { return this; } - /** - * Get the migrationRequest property: The registration info of HostPool. - * - * @return the migrationRequest value. - */ - public MigrationRequestProperties migrationRequest() { - return this.innerProperties() == null ? null : this.innerProperties().migrationRequest(); - } - - /** - * Set the migrationRequest property: The registration info of HostPool. - * - * @param migrationRequest the migrationRequest value to set. - * @return the HostPoolInner object itself. - */ - public HostPoolInner withMigrationRequest(MigrationRequestProperties migrationRequest) { - if (this.innerProperties() == null) { - this.innerProperties = new HostPoolPropertiesInner(); - } - this.innerProperties().withMigrationRequest(migrationRequest); - return this; - } - /** * Get the cloudPcResource property: Is cloud pc resource. * @@ -551,27 +531,27 @@ public Boolean 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. + * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. * - * @return the publicNetworkAccess value. + * @return the agentUpdate value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + public AgentUpdateProperties agentUpdate() { + return this.innerProperties() == null ? null : this.innerProperties().agentUpdate(); } /** - * 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. + * Set the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. * - * @param publicNetworkAccess the publicNetworkAccess value to set. + * @param agentUpdate the agentUpdate value to set. * @return the HostPoolInner object itself. */ - public HostPoolInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + public HostPoolInner withAgentUpdate(AgentUpdateProperties agentUpdate) { if (this.innerProperties() == null) { this.innerProperties = new HostPoolPropertiesInner(); } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + this.innerProperties().withAgentUpdate(agentUpdate); return this; } 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 48cd2d3441100..04851ae8d7551 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 @@ -5,10 +5,10 @@ package com.azure.resourcemanager.desktopvirtualization.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdatePatchProperties; 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.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfoPatch; import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import com.fasterxml.jackson.annotation.JsonProperty; @@ -83,15 +83,13 @@ public final class HostPoolPatchProperties { private String ssoadfsAuthority; /* - * ClientId for the registered Relying Party used to issue WVD SSO - * certificates. + * ClientId for the registered Relying Party used to issue WVD SSO certificates. */ @JsonProperty(value = "ssoClientId") private String ssoClientId; /* - * Path to Azure KeyVault storing the secret used for communication to - * ADFS. + * Path to Azure KeyVault storing the secret used for communication to ADFS. */ @JsonProperty(value = "ssoClientSecretKeyVaultPath") private String ssoClientSecretKeyVaultPath; @@ -103,8 +101,7 @@ public final class HostPoolPatchProperties { private SsoSecretType ssoSecretType; /* - * The type of preferred application group type, default to Desktop - * Application Group + * The type of preferred application group type, default to Desktop Application Group */ @JsonProperty(value = "preferredAppGroupType") private PreferredAppGroupType preferredAppGroupType; @@ -116,10 +113,14 @@ public final class HostPoolPatchProperties { private Boolean startVMOnConnect; /* - * Enabled to allow this resource to be access from the public network + * The session host configuration for updating agent, monitoring agent, and stack component. */ - @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; + @JsonProperty(value = "agentUpdate") + private AgentUpdatePatchProperties agentUpdate; + + /** Creates an instance of HostPoolPatchProperties class. */ + public HostPoolPatchProperties() { + } /** * Get the friendlyName property: Friendly name of HostPool. @@ -447,22 +448,24 @@ public HostPoolPatchProperties withStartVMOnConnect(Boolean startVMOnConnect) { } /** - * Get the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. + * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. * - * @return the publicNetworkAccess value. + * @return the agentUpdate value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; + public AgentUpdatePatchProperties agentUpdate() { + return this.agentUpdate; } /** - * Set the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. + * Set the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. * - * @param publicNetworkAccess the publicNetworkAccess value to set. + * @param agentUpdate the agentUpdate value to set. * @return the HostPoolPatchProperties object itself. */ - public HostPoolPatchProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; + public HostPoolPatchProperties withAgentUpdate(AgentUpdatePatchProperties agentUpdate) { + this.agentUpdate = agentUpdate; return this; } @@ -475,5 +478,8 @@ public void validate() { if (registrationInfo() != null) { registrationInfo().validate(); } + if (agentUpdate() != null) { + agentUpdate().validate(); + } } } 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 761ad2ad2bed5..b44d59b1c2994 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 @@ -6,12 +6,11 @@ import com.azure.core.annotation.Fluent; 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.LoadBalancerType; -import com.azure.resourcemanager.desktopvirtualization.models.MigrationRequestProperties; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -104,15 +103,13 @@ public final class HostPoolPropertiesInner { private String ssoadfsAuthority; /* - * ClientId for the registered Relying Party used to issue WVD SSO - * certificates. + * ClientId for the registered Relying Party used to issue WVD SSO certificates. */ @JsonProperty(value = "ssoClientId") private String ssoClientId; /* - * Path to Azure KeyVault storing the secret used for communication to - * ADFS. + * Path to Azure KeyVault storing the secret used for communication to ADFS. */ @JsonProperty(value = "ssoClientSecretKeyVaultPath") private String ssoClientSecretKeyVaultPath; @@ -124,8 +121,7 @@ public final class HostPoolPropertiesInner { private SsoSecretType ssoSecretType; /* - * The type of preferred application group type, default to Desktop - * Application Group + * The type of preferred application group type, default to Desktop Application Group */ @JsonProperty(value = "preferredAppGroupType", required = true) private PreferredAppGroupType preferredAppGroupType; @@ -136,12 +132,6 @@ public final class HostPoolPropertiesInner { @JsonProperty(value = "startVMOnConnect") private Boolean startVMOnConnect; - /* - * The registration info of HostPool. - */ - @JsonProperty(value = "migrationRequest") - private MigrationRequestProperties migrationRequest; - /* * Is cloud pc resource. */ @@ -149,12 +139,14 @@ public final class HostPoolPropertiesInner { 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 + * The session host configuration for updating agent, monitoring agent, and stack component. */ - @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; + @JsonProperty(value = "agentUpdate") + private AgentUpdateProperties agentUpdate; + + /** Creates an instance of HostPoolPropertiesInner class. */ + public HostPoolPropertiesInner() { + } /** * Get the objectId property: ObjectId of HostPool. (internal use). @@ -519,26 +511,6 @@ public HostPoolPropertiesInner withStartVMOnConnect(Boolean startVMOnConnect) { return this; } - /** - * Get the migrationRequest property: The registration info of HostPool. - * - * @return the migrationRequest value. - */ - public MigrationRequestProperties migrationRequest() { - return this.migrationRequest; - } - - /** - * Set the migrationRequest property: The registration info of HostPool. - * - * @param migrationRequest the migrationRequest value to set. - * @return the HostPoolPropertiesInner object itself. - */ - public HostPoolPropertiesInner withMigrationRequest(MigrationRequestProperties migrationRequest) { - this.migrationRequest = migrationRequest; - return this; - } - /** * Get the cloudPcResource property: Is cloud pc resource. * @@ -549,24 +521,24 @@ public Boolean 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. + * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. * - * @return the publicNetworkAccess value. + * @return the agentUpdate value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; + public AgentUpdateProperties agentUpdate() { + return this.agentUpdate; } /** - * 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. + * Set the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. * - * @param publicNetworkAccess the publicNetworkAccess value to set. + * @param agentUpdate the agentUpdate value to set. * @return the HostPoolPropertiesInner object itself. */ - public HostPoolPropertiesInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; + public HostPoolPropertiesInner withAgentUpdate(AgentUpdateProperties agentUpdate) { + this.agentUpdate = agentUpdate; return this; } @@ -597,8 +569,8 @@ public void validate() { new IllegalArgumentException( "Missing required property preferredAppGroupType in model HostPoolPropertiesInner")); } - if (migrationRequest() != null) { - migrationRequest().validate(); + if (agentUpdate() != null) { + agentUpdate().validate(); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackageInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackageInner.java index 9a21fb0061b1e..8c5bc71f9980a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackageInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackageInner.java @@ -29,6 +29,10 @@ public final class MsixPackageInner extends ProxyResource { @JsonProperty(value = "properties", required = true) private MsixPackageProperties innerProperties = new MsixPackageProperties(); + /** Creates an instance of MsixPackageInner class. */ + public MsixPackageInner() { + } + /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackagePatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackagePatchProperties.java index ee54e37107d2d..accc572ba392b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackagePatchProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackagePatchProperties.java @@ -28,6 +28,10 @@ public final class MsixPackagePatchProperties { @JsonProperty(value = "displayName") private String displayName; + /** Creates an instance of MsixPackagePatchProperties class. */ + public MsixPackagePatchProperties() { + } + /** * Get the isActive property: Set a version of the package to be active across hostpool. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackageProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackageProperties.java index ded353ee097c8..1ada5f495a17e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackageProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackageProperties.java @@ -27,8 +27,7 @@ public final class MsixPackageProperties { private String packageName; /* - * Package Family Name from appxmanifest.xml. Contains Package Name and - * Publisher name. + * Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. */ @JsonProperty(value = "packageFamilyName") private String packageFamilyName; @@ -81,6 +80,10 @@ public final class MsixPackageProperties { @JsonProperty(value = "packageApplications") private List packageApplications; + /** Creates an instance of MsixPackageProperties class. */ + public MsixPackageProperties() { + } + /** * Get the imagePath property: VHD/CIM image path on Network Share. * 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 deleted file mode 100644 index cf5e83fe67a82..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateEndpointConnectionProperties.java +++ /dev/null @@ -1,121 +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.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") - private PrivateEndpointConnectionProvisioningState provisioningState; - - /** - * 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; - } - - /** - * Set the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @param provisioningState the provisioningState value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties withProvisioningState( - PrivateEndpointConnectionProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * 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 deleted file mode 100644 index f9e336cc665eb..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateEndpointConnectionWithSystemDataInner.java +++ /dev/null @@ -1,65 +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.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.PrivateEndpointConnectionProvisioningState; -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; - - /** - * 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; - } - - /** {@inheritDoc} */ - @Override - public PrivateEndpointConnectionWithSystemDataInner withProvisioningState( - PrivateEndpointConnectionProvisioningState provisioningState) { - super.withProvisioningState(provisioningState); - 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 deleted file mode 100644 index 439b90260a48c..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateLinkResourceInner.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.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; - - /** - * 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 deleted file mode 100644 index ece05fd31c26a..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateLinkResourceProperties.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.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; - - /** - * 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/RegistrationInfoInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/RegistrationInfoInner.java index 37db6b73c8a46..5f0231ddac671 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/RegistrationInfoInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/RegistrationInfoInner.java @@ -30,6 +30,10 @@ public final class RegistrationInfoInner { @JsonProperty(value = "registrationTokenOperation") private RegistrationTokenOperation registrationTokenOperation; + /** Creates an instance of RegistrationInfoInner class. */ + public RegistrationInfoInner() { + } + /** * Get the expirationTime property: Expiration time of registration token. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ResourceProviderOperationInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ResourceProviderOperationInner.java index e3e61a89f90d7..a831f4453f31a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ResourceProviderOperationInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ResourceProviderOperationInner.java @@ -36,6 +36,10 @@ public final class ResourceProviderOperationInner { @JsonProperty(value = "properties") private OperationProperties properties; + /** Creates an instance of ResourceProviderOperationInner class. */ + public ResourceProviderOperationInner() { + } + /** * Get the name property: Operation name, in format of {provider}/{resource}/{operation}. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanInner.java index 848b0ba98bd2d..5d1edd7520cb9 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySet; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan; @@ -17,7 +18,11 @@ import java.util.List; import java.util.Map; -/** ScalingPlan Represents a scaling plan definition. */ +/** + * ScalingPlan + * + *

Represents a scaling plan definition. + */ @Fluent public final class ScalingPlanInner extends ResourceModelWithAllowedPropertySet { /* @@ -29,8 +34,12 @@ public final class ScalingPlanInner extends ResourceModelWithAllowedPropertySet /* * Detailed properties for scaling plan. */ - @JsonProperty(value = "properties") - private ScalingPlanProperties innerProperties; + @JsonProperty(value = "properties", required = true) + private ScalingPlanProperties innerProperties = new ScalingPlanProperties(); + + /** Creates an instance of ScalingPlanInner class. */ + public ScalingPlanInner() { + } /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. @@ -224,7 +233,7 @@ public ScalingPlanInner withExclusionTag(String exclusionTag) { } /** - * Get the schedules property: List of ScalingSchedule definitions. + * Get the schedules property: List of ScalingPlanPooledSchedule definitions. * * @return the schedules value. */ @@ -233,7 +242,7 @@ public List schedules() { } /** - * Set the schedules property: List of ScalingSchedule definitions. + * Set the schedules property: List of ScalingPlanPooledSchedule definitions. * * @param schedules the schedules value to set. * @return the ScalingPlanInner object itself. @@ -277,8 +286,15 @@ public ScalingPlanInner withHostPoolReferences(List ho @Override public void validate() { super.validate(); - if (innerProperties() != null) { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model ScalingPlanInner")); + } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ScalingPlanInner.class); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPatchProperties.java index a29a142e87552..f45e9b0364c26 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPatchProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPatchProperties.java @@ -49,6 +49,10 @@ public final class ScalingPlanPatchProperties { @JsonProperty(value = "hostPoolReferences") private List hostPoolReferences; + /** Creates an instance of ScalingPlanPatchProperties class. */ + public ScalingPlanPatchProperties() { + } + /** * Get the description property: Description of scaling plan. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPooledScheduleInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPooledScheduleInner.java new file mode 100644 index 0000000000000..42558d7dc480b --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPooledScheduleInner.java @@ -0,0 +1,467 @@ +// 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.SessionHostLoadBalancingAlgorithm; +import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Represents a ScalingPlanPooledSchedule definition. */ +@Fluent +public final class ScalingPlanPooledScheduleInner 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 ScalingPlanPooledSchedule + */ + @JsonProperty(value = "properties", required = true) + private ScalingPlanPooledScheduleProperties innerProperties = new ScalingPlanPooledScheduleProperties(); + + /** Creates an instance of ScalingPlanPooledScheduleInner class. */ + public ScalingPlanPooledScheduleInner() { + } + + /** + * 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 ScalingPlanPooledSchedule. + * + * @return the innerProperties value. + */ + private ScalingPlanPooledScheduleProperties 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 ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withDaysOfWeek(List daysOfWeek) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + 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 ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withRampUpStartTime(Time rampUpStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampUpStartTime(rampUpStartTime); + return this; + } + + /** + * Get the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period. + * + * @return the rampUpLoadBalancingAlgorithm value. + */ + public SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpLoadBalancingAlgorithm(); + } + + /** + * Set the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period. + * + * @param rampUpLoadBalancingAlgorithm the rampUpLoadBalancingAlgorithm value to set. + * @return the ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withRampUpLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampUpLoadBalancingAlgorithm(rampUpLoadBalancingAlgorithm); + return this; + } + + /** + * Get the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period. + * + * @return the rampUpMinimumHostsPct value. + */ + public Integer rampUpMinimumHostsPct() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpMinimumHostsPct(); + } + + /** + * Set the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period. + * + * @param rampUpMinimumHostsPct the rampUpMinimumHostsPct value to set. + * @return the ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withRampUpMinimumHostsPct(Integer rampUpMinimumHostsPct) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampUpMinimumHostsPct(rampUpMinimumHostsPct); + return this; + } + + /** + * Get the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. + * + * @return the rampUpCapacityThresholdPct value. + */ + public Integer rampUpCapacityThresholdPct() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpCapacityThresholdPct(); + } + + /** + * Set the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. + * + * @param rampUpCapacityThresholdPct the rampUpCapacityThresholdPct value to set. + * @return the ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withRampUpCapacityThresholdPct(Integer rampUpCapacityThresholdPct) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampUpCapacityThresholdPct(rampUpCapacityThresholdPct); + 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 ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withPeakStartTime(Time peakStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withPeakStartTime(peakStartTime); + return this; + } + + /** + * Get the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period. + * + * @return the peakLoadBalancingAlgorithm value. + */ + public SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm() { + return this.innerProperties() == null ? null : this.innerProperties().peakLoadBalancingAlgorithm(); + } + + /** + * Set the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period. + * + * @param peakLoadBalancingAlgorithm the peakLoadBalancingAlgorithm value to set. + * @return the ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withPeakLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withPeakLoadBalancingAlgorithm(peakLoadBalancingAlgorithm); + 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 ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withRampDownStartTime(Time rampDownStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownStartTime(rampDownStartTime); + return this; + } + + /** + * Get the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period. + * + * @return the rampDownLoadBalancingAlgorithm value. + */ + public SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownLoadBalancingAlgorithm(); + } + + /** + * Set the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period. + * + * @param rampDownLoadBalancingAlgorithm the rampDownLoadBalancingAlgorithm value to set. + * @return the ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withRampDownLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownLoadBalancingAlgorithm(rampDownLoadBalancingAlgorithm); + return this; + } + + /** + * Get the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period. + * + * @return the rampDownMinimumHostsPct value. + */ + public Integer rampDownMinimumHostsPct() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownMinimumHostsPct(); + } + + /** + * Set the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period. + * + * @param rampDownMinimumHostsPct the rampDownMinimumHostsPct value to set. + * @return the ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withRampDownMinimumHostsPct(Integer rampDownMinimumHostsPct) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownMinimumHostsPct(rampDownMinimumHostsPct); + return this; + } + + /** + * Get the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. + * + * @return the rampDownCapacityThresholdPct value. + */ + public Integer rampDownCapacityThresholdPct() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownCapacityThresholdPct(); + } + + /** + * Set the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. + * + * @param rampDownCapacityThresholdPct the rampDownCapacityThresholdPct value to set. + * @return the ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withRampDownCapacityThresholdPct(Integer rampDownCapacityThresholdPct) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownCapacityThresholdPct(rampDownCapacityThresholdPct); + return this; + } + + /** + * Get the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts. + * + * @return the rampDownForceLogoffUsers value. + */ + public Boolean rampDownForceLogoffUsers() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownForceLogoffUsers(); + } + + /** + * Set the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts. + * + * @param rampDownForceLogoffUsers the rampDownForceLogoffUsers value to set. + * @return the ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withRampDownForceLogoffUsers(Boolean rampDownForceLogoffUsers) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownForceLogoffUsers(rampDownForceLogoffUsers); + return this; + } + + /** + * Get the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period. + * + * @return the rampDownStopHostsWhen value. + */ + public StopHostsWhen rampDownStopHostsWhen() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownStopHostsWhen(); + } + + /** + * Set the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period. + * + * @param rampDownStopHostsWhen the rampDownStopHostsWhen value to set. + * @return the ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withRampDownStopHostsWhen(StopHostsWhen rampDownStopHostsWhen) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownStopHostsWhen(rampDownStopHostsWhen); + return this; + } + + /** + * Get the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down period. + * + * @return the rampDownWaitTimeMinutes value. + */ + public Integer rampDownWaitTimeMinutes() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownWaitTimeMinutes(); + } + + /** + * Set the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down period. + * + * @param rampDownWaitTimeMinutes the rampDownWaitTimeMinutes value to set. + * @return the ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withRampDownWaitTimeMinutes(Integer rampDownWaitTimeMinutes) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownWaitTimeMinutes(rampDownWaitTimeMinutes); + return this; + } + + /** + * Get the rampDownNotificationMessage property: Notification message for users during ramp down period. + * + * @return the rampDownNotificationMessage value. + */ + public String rampDownNotificationMessage() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownNotificationMessage(); + } + + /** + * Set the rampDownNotificationMessage property: Notification message for users during ramp down period. + * + * @param rampDownNotificationMessage the rampDownNotificationMessage value to set. + * @return the ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withRampDownNotificationMessage(String rampDownNotificationMessage) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownNotificationMessage(rampDownNotificationMessage); + 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 ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withOffPeakStartTime(Time offPeakStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withOffPeakStartTime(offPeakStartTime); + return this; + } + + /** + * Get the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period. + * + * @return the offPeakLoadBalancingAlgorithm value. + */ + public SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm() { + return this.innerProperties() == null ? null : this.innerProperties().offPeakLoadBalancingAlgorithm(); + } + + /** + * Set the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period. + * + * @param offPeakLoadBalancingAlgorithm the offPeakLoadBalancingAlgorithm value to set. + * @return the ScalingPlanPooledScheduleInner object itself. + */ + public ScalingPlanPooledScheduleInner withOffPeakLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withOffPeakLoadBalancingAlgorithm(offPeakLoadBalancingAlgorithm); + 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 ScalingPlanPooledScheduleInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScalingPlanPooledScheduleInner.class); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPooledScheduleProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPooledScheduleProperties.java new file mode 100644 index 0000000000000..93b650a07c2f0 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPooledScheduleProperties.java @@ -0,0 +1,487 @@ +// 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.SessionHostLoadBalancingAlgorithm; +import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A ScalingPlanPooledSchedule. */ +@Fluent +public final class ScalingPlanPooledScheduleProperties { + /* + * 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; + + /* + * Load balancing algorithm for ramp up period. + */ + @JsonProperty(value = "rampUpLoadBalancingAlgorithm") + private SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm; + + /* + * Minimum host percentage for ramp up period. + */ + @JsonProperty(value = "rampUpMinimumHostsPct") + private Integer rampUpMinimumHostsPct; + + /* + * Capacity threshold for ramp up period. + */ + @JsonProperty(value = "rampUpCapacityThresholdPct") + private Integer rampUpCapacityThresholdPct; + + /* + * Starting time for peak period. + */ + @JsonProperty(value = "peakStartTime") + private Time peakStartTime; + + /* + * Load balancing algorithm for peak period. + */ + @JsonProperty(value = "peakLoadBalancingAlgorithm") + private SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm; + + /* + * Starting time for ramp down period. + */ + @JsonProperty(value = "rampDownStartTime") + private Time rampDownStartTime; + + /* + * Load balancing algorithm for ramp down period. + */ + @JsonProperty(value = "rampDownLoadBalancingAlgorithm") + private SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm; + + /* + * Minimum host percentage for ramp down period. + */ + @JsonProperty(value = "rampDownMinimumHostsPct") + private Integer rampDownMinimumHostsPct; + + /* + * Capacity threshold for ramp down period. + */ + @JsonProperty(value = "rampDownCapacityThresholdPct") + private Integer rampDownCapacityThresholdPct; + + /* + * Should users be logged off forcefully from hosts. + */ + @JsonProperty(value = "rampDownForceLogoffUsers") + private Boolean rampDownForceLogoffUsers; + + /* + * Specifies when to stop hosts during ramp down period. + */ + @JsonProperty(value = "rampDownStopHostsWhen") + private StopHostsWhen rampDownStopHostsWhen; + + /* + * Number of minutes to wait to stop hosts during ramp down period. + */ + @JsonProperty(value = "rampDownWaitTimeMinutes") + private Integer rampDownWaitTimeMinutes; + + /* + * Notification message for users during ramp down period. + */ + @JsonProperty(value = "rampDownNotificationMessage") + private String rampDownNotificationMessage; + + /* + * Starting time for off-peak period. + */ + @JsonProperty(value = "offPeakStartTime") + private Time offPeakStartTime; + + /* + * Load balancing algorithm for off-peak period. + */ + @JsonProperty(value = "offPeakLoadBalancingAlgorithm") + private SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm; + + /** Creates an instance of ScalingPlanPooledScheduleProperties class. */ + public ScalingPlanPooledScheduleProperties() { + } + + /** + * 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 ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties 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 ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withRampUpStartTime(Time rampUpStartTime) { + this.rampUpStartTime = rampUpStartTime; + return this; + } + + /** + * Get the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period. + * + * @return the rampUpLoadBalancingAlgorithm value. + */ + public SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm() { + return this.rampUpLoadBalancingAlgorithm; + } + + /** + * Set the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period. + * + * @param rampUpLoadBalancingAlgorithm the rampUpLoadBalancingAlgorithm value to set. + * @return the ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withRampUpLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm) { + this.rampUpLoadBalancingAlgorithm = rampUpLoadBalancingAlgorithm; + return this; + } + + /** + * Get the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period. + * + * @return the rampUpMinimumHostsPct value. + */ + public Integer rampUpMinimumHostsPct() { + return this.rampUpMinimumHostsPct; + } + + /** + * Set the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period. + * + * @param rampUpMinimumHostsPct the rampUpMinimumHostsPct value to set. + * @return the ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withRampUpMinimumHostsPct(Integer rampUpMinimumHostsPct) { + this.rampUpMinimumHostsPct = rampUpMinimumHostsPct; + return this; + } + + /** + * Get the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. + * + * @return the rampUpCapacityThresholdPct value. + */ + public Integer rampUpCapacityThresholdPct() { + return this.rampUpCapacityThresholdPct; + } + + /** + * Set the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. + * + * @param rampUpCapacityThresholdPct the rampUpCapacityThresholdPct value to set. + * @return the ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withRampUpCapacityThresholdPct(Integer rampUpCapacityThresholdPct) { + this.rampUpCapacityThresholdPct = rampUpCapacityThresholdPct; + 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 ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withPeakStartTime(Time peakStartTime) { + this.peakStartTime = peakStartTime; + return this; + } + + /** + * Get the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period. + * + * @return the peakLoadBalancingAlgorithm value. + */ + public SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm() { + return this.peakLoadBalancingAlgorithm; + } + + /** + * Set the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period. + * + * @param peakLoadBalancingAlgorithm the peakLoadBalancingAlgorithm value to set. + * @return the ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withPeakLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm) { + this.peakLoadBalancingAlgorithm = peakLoadBalancingAlgorithm; + 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 ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withRampDownStartTime(Time rampDownStartTime) { + this.rampDownStartTime = rampDownStartTime; + return this; + } + + /** + * Get the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period. + * + * @return the rampDownLoadBalancingAlgorithm value. + */ + public SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm() { + return this.rampDownLoadBalancingAlgorithm; + } + + /** + * Set the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period. + * + * @param rampDownLoadBalancingAlgorithm the rampDownLoadBalancingAlgorithm value to set. + * @return the ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withRampDownLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm) { + this.rampDownLoadBalancingAlgorithm = rampDownLoadBalancingAlgorithm; + return this; + } + + /** + * Get the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period. + * + * @return the rampDownMinimumHostsPct value. + */ + public Integer rampDownMinimumHostsPct() { + return this.rampDownMinimumHostsPct; + } + + /** + * Set the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period. + * + * @param rampDownMinimumHostsPct the rampDownMinimumHostsPct value to set. + * @return the ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withRampDownMinimumHostsPct(Integer rampDownMinimumHostsPct) { + this.rampDownMinimumHostsPct = rampDownMinimumHostsPct; + return this; + } + + /** + * Get the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. + * + * @return the rampDownCapacityThresholdPct value. + */ + public Integer rampDownCapacityThresholdPct() { + return this.rampDownCapacityThresholdPct; + } + + /** + * Set the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. + * + * @param rampDownCapacityThresholdPct the rampDownCapacityThresholdPct value to set. + * @return the ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withRampDownCapacityThresholdPct(Integer rampDownCapacityThresholdPct) { + this.rampDownCapacityThresholdPct = rampDownCapacityThresholdPct; + return this; + } + + /** + * Get the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts. + * + * @return the rampDownForceLogoffUsers value. + */ + public Boolean rampDownForceLogoffUsers() { + return this.rampDownForceLogoffUsers; + } + + /** + * Set the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts. + * + * @param rampDownForceLogoffUsers the rampDownForceLogoffUsers value to set. + * @return the ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withRampDownForceLogoffUsers(Boolean rampDownForceLogoffUsers) { + this.rampDownForceLogoffUsers = rampDownForceLogoffUsers; + return this; + } + + /** + * Get the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period. + * + * @return the rampDownStopHostsWhen value. + */ + public StopHostsWhen rampDownStopHostsWhen() { + return this.rampDownStopHostsWhen; + } + + /** + * Set the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period. + * + * @param rampDownStopHostsWhen the rampDownStopHostsWhen value to set. + * @return the ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withRampDownStopHostsWhen(StopHostsWhen rampDownStopHostsWhen) { + this.rampDownStopHostsWhen = rampDownStopHostsWhen; + return this; + } + + /** + * Get the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down period. + * + * @return the rampDownWaitTimeMinutes value. + */ + public Integer rampDownWaitTimeMinutes() { + return this.rampDownWaitTimeMinutes; + } + + /** + * Set the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down period. + * + * @param rampDownWaitTimeMinutes the rampDownWaitTimeMinutes value to set. + * @return the ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withRampDownWaitTimeMinutes(Integer rampDownWaitTimeMinutes) { + this.rampDownWaitTimeMinutes = rampDownWaitTimeMinutes; + return this; + } + + /** + * Get the rampDownNotificationMessage property: Notification message for users during ramp down period. + * + * @return the rampDownNotificationMessage value. + */ + public String rampDownNotificationMessage() { + return this.rampDownNotificationMessage; + } + + /** + * Set the rampDownNotificationMessage property: Notification message for users during ramp down period. + * + * @param rampDownNotificationMessage the rampDownNotificationMessage value to set. + * @return the ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withRampDownNotificationMessage(String rampDownNotificationMessage) { + this.rampDownNotificationMessage = rampDownNotificationMessage; + 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 ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withOffPeakStartTime(Time offPeakStartTime) { + this.offPeakStartTime = offPeakStartTime; + return this; + } + + /** + * Get the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period. + * + * @return the offPeakLoadBalancingAlgorithm value. + */ + public SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm() { + return this.offPeakLoadBalancingAlgorithm; + } + + /** + * Set the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period. + * + * @param offPeakLoadBalancingAlgorithm the offPeakLoadBalancingAlgorithm value to set. + * @return the ScalingPlanPooledScheduleProperties object itself. + */ + public ScalingPlanPooledScheduleProperties withOffPeakLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm) { + this.offPeakLoadBalancingAlgorithm = offPeakLoadBalancingAlgorithm; + 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/ScalingPlanProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanProperties.java index 46ed04be81b96..73fcf6c87140f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanProperties.java @@ -5,6 +5,7 @@ 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.ScalingHostPoolReference; import com.azure.resourcemanager.desktopvirtualization.models.ScalingHostPoolType; import com.azure.resourcemanager.desktopvirtualization.models.ScalingSchedule; @@ -35,7 +36,7 @@ public final class ScalingPlanProperties { /* * Timezone of the scaling plan. */ - @JsonProperty(value = "timeZone") + @JsonProperty(value = "timeZone", required = true) private String timeZone; /* @@ -51,7 +52,7 @@ public final class ScalingPlanProperties { private String exclusionTag; /* - * List of ScalingSchedule definitions. + * List of ScalingPlanPooledSchedule definitions. */ @JsonProperty(value = "schedules") private List schedules; @@ -62,6 +63,10 @@ public final class ScalingPlanProperties { @JsonProperty(value = "hostPoolReferences") private List hostPoolReferences; + /** Creates an instance of ScalingPlanProperties class. */ + public ScalingPlanProperties() { + } + /** * Get the objectId property: ObjectId of scaling plan. (internal use). * @@ -172,7 +177,7 @@ public ScalingPlanProperties withExclusionTag(String exclusionTag) { } /** - * Get the schedules property: List of ScalingSchedule definitions. + * Get the schedules property: List of ScalingPlanPooledSchedule definitions. * * @return the schedules value. */ @@ -181,7 +186,7 @@ public List schedules() { } /** - * Set the schedules property: List of ScalingSchedule definitions. + * Set the schedules property: List of ScalingPlanPooledSchedule definitions. * * @param schedules the schedules value to set. * @return the ScalingPlanProperties object itself. @@ -217,6 +222,11 @@ public ScalingPlanProperties withHostPoolReferences(List e.validate()); } @@ -224,4 +234,6 @@ public void validate() { hostPoolReferences().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(ScalingPlanProperties.class); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostInner.java index 927a5b91fbd68..fa94341d807ac 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostInner.java @@ -29,6 +29,10 @@ public final class SessionHostInner extends ProxyResource { @JsonProperty(value = "properties") private SessionHostProperties innerProperties; + /** Creates an instance of SessionHostInner class. */ + public SessionHostInner() { + } + /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * @@ -189,6 +193,29 @@ public SessionHostInner withAssignedUser(String assignedUser) { return this; } + /** + * Get the friendlyName property: Friendly name of SessionHost. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); + } + + /** + * Set the friendlyName property: Friendly name of SessionHost. + * + * @param friendlyName the friendlyName value to set. + * @return the SessionHostInner object itself. + */ + public SessionHostInner withFriendlyName(String friendlyName) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionHostProperties(); + } + this.innerProperties().withFriendlyName(friendlyName); + return this; + } + /** * Get the status property: Status for a SessionHost. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostPatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostPatchProperties.java index 46a45946e5df5..9a71b1b6ab2ad 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostPatchProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostPatchProperties.java @@ -22,6 +22,16 @@ public final class SessionHostPatchProperties { @JsonProperty(value = "assignedUser") private String assignedUser; + /* + * Friendly name of SessionHost + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** Creates an instance of SessionHostPatchProperties class. */ + public SessionHostPatchProperties() { + } + /** * Get the allowNewSession property: Allow a new session. * @@ -62,6 +72,26 @@ public SessionHostPatchProperties withAssignedUser(String assignedUser) { return this; } + /** + * Get the friendlyName property: Friendly name of SessionHost. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the friendlyName property: Friendly name of SessionHost. + * + * @param friendlyName the friendlyName value to set. + * @return the SessionHostPatchProperties object itself. + */ + public SessionHostPatchProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + /** * Validates the instance. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostProperties.java index 840a5ad6dd543..e59277002883d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostProperties.java @@ -63,6 +63,12 @@ public final class SessionHostProperties { @JsonProperty(value = "assignedUser") private String assignedUser; + /* + * Friendly name of SessionHost + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + /* * Status for a SessionHost. */ @@ -111,6 +117,10 @@ public final class SessionHostProperties { @JsonProperty(value = "sessionHostHealthCheckResults", access = JsonProperty.Access.WRITE_ONLY) private List sessionHostHealthCheckResults; + /** Creates an instance of SessionHostProperties class. */ + public SessionHostProperties() { + } + /** * Get the objectId property: ObjectId of SessionHost. (internal use). * @@ -238,6 +248,26 @@ public SessionHostProperties withAssignedUser(String assignedUser) { return this; } + /** + * Get the friendlyName property: Friendly name of SessionHost. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the friendlyName property: Friendly name of SessionHost. + * + * @param friendlyName the friendlyName value to set. + * @return the SessionHostProperties object itself. + */ + public SessionHostProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + /** * Get the status property: Status for a SessionHost. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/StartMenuItemInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/StartMenuItemInner.java index 07ba231365350..7e6345c2bab5e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/StartMenuItemInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/StartMenuItemInner.java @@ -17,6 +17,10 @@ public final class StartMenuItemInner extends ProxyResource { @JsonProperty(value = "properties") private StartMenuItemProperties innerProperties; + /** Creates an instance of StartMenuItemInner class. */ + public StartMenuItemInner() { + } + /** * Get the innerProperties property: Detailed properties for StartMenuItem. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/StartMenuItemProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/StartMenuItemProperties.java index f80324dad3723..6ae58ea60c2f1 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/StartMenuItemProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/StartMenuItemProperties.java @@ -40,6 +40,10 @@ public final class StartMenuItemProperties { @JsonProperty(value = "iconIndex") private Integer iconIndex; + /** Creates an instance of StartMenuItemProperties class. */ + public StartMenuItemProperties() { + } + /** * Get the appAlias property: Alias of StartMenuItem. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/UserSessionInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/UserSessionInner.java index 0f622d805ba73..2246919d25396 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/UserSessionInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/UserSessionInner.java @@ -27,6 +27,10 @@ public final class UserSessionInner extends ProxyResource { @JsonProperty(value = "properties") private UserSessionProperties innerProperties; + /** Creates an instance of UserSessionInner class. */ + public UserSessionInner() { + } + /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/UserSessionProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/UserSessionProperties.java index 47d8a58dde274..925653d0fdf5d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/UserSessionProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/UserSessionProperties.java @@ -49,6 +49,10 @@ public final class UserSessionProperties { @JsonProperty(value = "createTime") private OffsetDateTime createTime; + /** Creates an instance of UserSessionProperties class. */ + public UserSessionProperties() { + } + /** * Get the objectId property: ObjectId of user session. (internal use). * 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 38be786b03dc0..37c0925810d7f 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,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.SystemData; -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; @@ -30,6 +29,10 @@ public final class WorkspaceInner extends ResourceModelWithAllowedPropertySet { @JsonProperty(value = "properties") private WorkspaceProperties innerProperties; + /** Creates an instance of WorkspaceInner class. */ + public WorkspaceInner() { + } + /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * @@ -184,31 +187,6 @@ 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; - } - /** * 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 c428ece147976..b92f1f55a6520 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,7 +5,6 @@ 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; @@ -30,11 +29,9 @@ 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() { + } /** * Get the description property: Description of Workspace. @@ -96,26 +93,6 @@ 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 6ce6ef2e3fd24..56641d158baea 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,7 +5,6 @@ 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; @@ -42,13 +41,9 @@ 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; + /** Creates an instance of WorkspaceProperties class. */ + public WorkspaceProperties() { + } /** * Get the objectId property: ObjectId of Workspace. (internal use). @@ -128,28 +123,6 @@ 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; - } - /** * Validates the instance. * 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 eb7fea099b090..5bb695f67ac46 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 @@ -11,7 +11,6 @@ import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroup; import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupPatch; import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupType; -import com.azure.resourcemanager.desktopvirtualization.models.MigrationRequestProperties; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetSku; @@ -101,10 +100,6 @@ public ApplicationGroupType applicationGroupType() { return this.innerModel().applicationGroupType(); } - public MigrationRequestProperties migrationRequest() { - return this.innerModel().migrationRequest(); - } - public Boolean cloudPcResource() { return this.innerModel().cloudPcResource(); } @@ -296,11 +291,6 @@ public ApplicationGroupImpl withFriendlyName(String friendlyName) { } } - public ApplicationGroupImpl withMigrationRequest(MigrationRequestProperties migrationRequest) { - this.innerModel().withMigrationRequest(migrationRequest); - 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/ApplicationGroupsClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupsClientImpl.java index 5ddd40f0fa50e..e05f28572ddfe 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupsClientImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupsClientImpl.java @@ -135,6 +135,9 @@ Mono> listByResourceGroup( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); @@ -182,7 +185,7 @@ Mono> listBySubscriptionNext( * @return an application group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( + private Mono> getByResourceGroupWithResponseAsync( String resourceGroupName, String applicationGroupName) { if (this.client.getEndpoint() == null) { return Mono @@ -278,7 +281,7 @@ private Mono> getByResourceGroupWithResponseAsyn * @return an application group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String applicationGroupName) { + private Mono getByResourceGroupAsync(String resourceGroupName, String applicationGroupName) { return getByResourceGroupWithResponseAsync(resourceGroupName, applicationGroupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -288,14 +291,16 @@ public Mono getByResourceGroupAsync(String resourceGroupN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @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 an application group. + * @return an application group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationGroupInner getByResourceGroup(String resourceGroupName, String applicationGroupName) { - return getByResourceGroupAsync(resourceGroupName, applicationGroupName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String applicationGroupName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, applicationGroupName, context).block(); } /** @@ -303,16 +308,14 @@ public ApplicationGroupInner getByResourceGroup(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. - * @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 an application group along with {@link Response}. + * @return an application group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String applicationGroupName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, applicationGroupName, context).block(); + public ApplicationGroupInner getByResourceGroup(String resourceGroupName, String applicationGroupName) { + return getByResourceGroupWithResponse(resourceGroupName, applicationGroupName, Context.NONE).getValue(); } /** @@ -328,7 +331,7 @@ public Response getByResourceGroupWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup) { if (this.client.getEndpoint() == null) { return Mono @@ -444,7 +447,7 @@ private Mono> createOrUpdateWithResponseAsync( * @return represents a ApplicationGroup definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup) { return createOrUpdateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -456,15 +459,20 @@ public Mono createOrUpdateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationGroup Object containing ApplicationGroup 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 ApplicationGroup definition. + * @return represents a ApplicationGroup definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationGroupInner createOrUpdate( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup) { - return createOrUpdateAsync(resourceGroupName, applicationGroupName, applicationGroup).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String applicationGroupName, + ApplicationGroupInner applicationGroup, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup, context) + .block(); } /** @@ -473,20 +481,16 @@ public ApplicationGroupInner createOrUpdate( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationGroup Object containing ApplicationGroup 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 ApplicationGroup definition along with {@link Response}. + * @return represents a ApplicationGroup definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String applicationGroupName, - ApplicationGroupInner applicationGroup, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup, context) - .block(); + public ApplicationGroupInner createOrUpdate( + String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup) { + return createOrUpdateWithResponse(resourceGroupName, applicationGroupName, applicationGroup, Context.NONE) + .getValue(); } /** @@ -500,7 +504,7 @@ public Response createOrUpdateWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String applicationGroupName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String applicationGroupName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -595,7 +599,7 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String applicationGroupName) { + private Mono deleteAsync(String resourceGroupName, String applicationGroupName) { return deleteWithResponseAsync(resourceGroupName, applicationGroupName).flatMap(ignored -> Mono.empty()); } @@ -604,13 +608,15 @@ public Mono deleteAsync(String resourceGroupName, String applicationGroupN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @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 void delete(String resourceGroupName, String applicationGroupName) { - deleteAsync(resourceGroupName, applicationGroupName).block(); + public Response deleteWithResponse(String resourceGroupName, String applicationGroupName, Context context) { + return deleteWithResponseAsync(resourceGroupName, applicationGroupName, context).block(); } /** @@ -618,15 +624,13 @@ public void delete(String resourceGroupName, String applicationGroupName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. - * @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 applicationGroupName, Context context) { - return deleteWithResponseAsync(resourceGroupName, applicationGroupName, context).block(); + public void delete(String resourceGroupName, String applicationGroupName) { + deleteWithResponse(resourceGroupName, applicationGroupName, Context.NONE); } /** @@ -642,7 +646,7 @@ public Response deleteWithResponse(String resourceGroupName, String applic * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String applicationGroupName, ApplicationGroupPatch applicationGroup) { if (this.client.getEndpoint() == null) { return Mono @@ -745,15 +749,14 @@ private Mono> updateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. - * @param applicationGroup Object containing ApplicationGroup 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 ApplicationGroup definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupPatch applicationGroup) { + private Mono updateAsync(String resourceGroupName, String applicationGroupName) { + final ApplicationGroupPatch applicationGroup = null; return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -763,16 +766,20 @@ public Mono updateAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param applicationGroup Object containing ApplicationGroup 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 ApplicationGroup definition on successful completion of {@link Mono}. + * @return represents a ApplicationGroup definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String applicationGroupName) { - final ApplicationGroupPatch applicationGroup = null; - return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, + String applicationGroupName, + ApplicationGroupPatch applicationGroup, + Context context) { + return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup, context).block(); } /** @@ -788,28 +795,7 @@ public Mono updateAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public ApplicationGroupInner update(String resourceGroupName, String applicationGroupName) { final ApplicationGroupPatch applicationGroup = null; - return updateAsync(resourceGroupName, applicationGroupName, applicationGroup).block(); - } - - /** - * Update an applicationGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationGroup Object containing ApplicationGroup 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 ApplicationGroup definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String applicationGroupName, - ApplicationGroupPatch applicationGroup, - Context context) { - return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup, context).block(); + return updateWithResponse(resourceGroupName, applicationGroupName, applicationGroup, Context.NONE).getValue(); } /** @@ -817,6 +803,9 @@ public Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. + * @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. @@ -824,7 +813,7 @@ public Response updateWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String filter) { + String resourceGroupName, String filter, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -852,6 +841,9 @@ private Mono> listByResourceGroupSinglePage this.client.getSubscriptionId(), resourceGroupName, filter, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -871,6 +863,9 @@ private Mono> listByResourceGroupSinglePage * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. + * @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. @@ -879,7 +874,12 @@ private Mono> listByResourceGroupSinglePage */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String filter, Context context) { + String resourceGroupName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -905,6 +905,9 @@ private Mono> listByResourceGroupSinglePage this.client.getSubscriptionId(), resourceGroupName, filter, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -923,15 +926,19 @@ private Mono> listByResourceGroupSinglePage * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. + * @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 applicationGroupList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter) { + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, String filter, Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, pageSize, isDescending, initialSkip), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } @@ -945,10 +952,13 @@ public PagedFlux listByResourceGroupAsync(String resource * @return applicationGroupList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { final String filter = null; + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, pageSize, isDescending, initialSkip), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } @@ -957,6 +967,9 @@ public PagedFlux listByResourceGroupAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. + * @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. @@ -965,9 +978,16 @@ public PagedFlux listByResourceGroupAsync(String resource */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( - String resourceGroupName, String filter, Context context) { + String resourceGroupName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, context), + () -> + listByResourceGroupSinglePageAsync( + resourceGroupName, filter, pageSize, isDescending, initialSkip, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } @@ -983,7 +1003,11 @@ private PagedFlux listByResourceGroupAsync( @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listByResourceGroupAsync(resourceGroupName, filter, pageSize, isDescending, initialSkip)); } /** @@ -991,6 +1015,9 @@ public PagedIterable listByResourceGroup(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. + * @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. @@ -999,8 +1026,14 @@ public PagedIterable listByResourceGroup(String resourceG */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup( - String resourceGroupName, String filter, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter, context)); + String resourceGroupName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listByResourceGroupAsync(resourceGroupName, filter, pageSize, isDescending, initialSkip, context)); } /** @@ -1105,7 +1138,7 @@ private Mono> listSinglePageAsync(String fi * @return applicationGroupList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String filter) { + private PagedFlux listAsync(String filter) { return new PagedFlux<>( () -> listSinglePageAsync(filter), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } @@ -1118,7 +1151,7 @@ public PagedFlux listAsync(String filter) { * @return applicationGroupList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { + private PagedFlux listAsync() { final String filter = null; return new PagedFlux<>( () -> listSinglePageAsync(filter), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); @@ -1172,7 +1205,8 @@ public PagedIterable list(String filter, Context context) /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1208,7 +1242,8 @@ private Mono> listByResourceGroupNextSingle /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1245,7 +1280,8 @@ private Mono> listByResourceGroupNextSingle /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1281,7 +1317,8 @@ private Mono> listBySubscriptionNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupsImpl.java index f1565227bcde1..b9289db001bad 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupsImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupsImpl.java @@ -28,15 +28,6 @@ public ApplicationGroupsImpl( this.serviceManager = serviceManager; } - public ApplicationGroup getByResourceGroup(String resourceGroupName, String applicationGroupName) { - ApplicationGroupInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, applicationGroupName); - if (inner != null) { - return new ApplicationGroupImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String applicationGroupName, Context context) { Response inner = @@ -52,23 +43,40 @@ public Response getByResourceGroupWithResponse( } } - public void deleteByResourceGroup(String resourceGroupName, String applicationGroupName) { - this.serviceClient().delete(resourceGroupName, applicationGroupName); + public ApplicationGroup getByResourceGroup(String resourceGroupName, String applicationGroupName) { + ApplicationGroupInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, applicationGroupName); + if (inner != null) { + return new ApplicationGroupImpl(inner, this.manager()); + } else { + return null; + } } - public Response deleteWithResponse(String resourceGroupName, String applicationGroupName, Context context) { + public Response deleteByResourceGroupWithResponse( + String resourceGroupName, String applicationGroupName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, applicationGroupName, context); } + public void deleteByResourceGroup(String resourceGroupName, String applicationGroupName) { + this.serviceClient().delete(resourceGroupName, applicationGroupName); + } + public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return Utils.mapPage(inner, inner1 -> new ApplicationGroupImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup( - String resourceGroupName, String filter, Context context) { + String resourceGroupName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, filter, context); + this + .serviceClient() + .listByResourceGroup(resourceGroupName, filter, pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new ApplicationGroupImpl(inner1, this.manager())); } @@ -142,7 +150,7 @@ public void deleteById(String id) { .format( "The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); } - this.deleteWithResponse(resourceGroupName, applicationGroupName, Context.NONE); + this.deleteByResourceGroupWithResponse(resourceGroupName, applicationGroupName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { @@ -163,7 +171,7 @@ public Response deleteByIdWithResponse(String id, Context context) { .format( "The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); } - return this.deleteWithResponse(resourceGroupName, applicationGroupName, context); + return this.deleteByResourceGroupWithResponse(resourceGroupName, applicationGroupName, context); } private ApplicationGroupsClient serviceClient() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationsClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationsClientImpl.java index 01248b359e02e..ab67f4367c446 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationsClientImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationsClientImpl.java @@ -143,6 +143,9 @@ Mono> list( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("applicationGroupName") String applicationGroupName, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); @@ -169,7 +172,7 @@ Mono> listNext( * @return an application along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String applicationGroupName, String applicationName) { if (this.client.getEndpoint() == null) { return Mono @@ -277,7 +280,7 @@ private Mono> getWithResponseAsync( * @return an application on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( + private Mono getAsync( String resourceGroupName, String applicationGroupName, String applicationName) { return getWithResponseAsync(resourceGroupName, applicationGroupName, applicationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -289,14 +292,16 @@ public Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. + * @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 an application. + * @return an application along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInner get(String resourceGroupName, String applicationGroupName, String applicationName) { - return getAsync(resourceGroupName, applicationGroupName, applicationName).block(); + public Response getWithResponse( + String resourceGroupName, String applicationGroupName, String applicationName, Context context) { + return getWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, context).block(); } /** @@ -305,16 +310,14 @@ public ApplicationInner get(String resourceGroupName, String applicationGroupNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. - * @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 an application along with {@link Response}. + * @return an application. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String applicationGroupName, String applicationName, Context context) { - return getWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, context).block(); + public ApplicationInner get(String resourceGroupName, String applicationGroupName, String applicationName) { + return getWithResponse(resourceGroupName, applicationGroupName, applicationName, Context.NONE).getValue(); } /** @@ -330,7 +333,7 @@ public Response getWithResponse( * @return schema for Application properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application) { if (this.client.getEndpoint() == null) { return Mono @@ -456,7 +459,7 @@ private Mono> createOrUpdateWithResponseAsync( * @return schema for Application properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application) { return createOrUpdateWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, application) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -469,15 +472,22 @@ public Mono createOrUpdateAsync( * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. * @param application Object containing Application 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 schema for Application properties. + * @return schema for Application properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInner createOrUpdate( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application) { - return createOrUpdateAsync(resourceGroupName, applicationGroupName, applicationName, application).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String applicationGroupName, + String applicationName, + ApplicationInner application, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, applicationGroupName, applicationName, application, context) + .block(); } /** @@ -487,22 +497,17 @@ public ApplicationInner createOrUpdate( * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. * @param application Object containing Application 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 schema for Application properties along with {@link Response}. + * @return schema for Application properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String applicationGroupName, - String applicationName, - ApplicationInner application, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, applicationGroupName, applicationName, application, context) - .block(); + public ApplicationInner createOrUpdate( + String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application) { + return createOrUpdateWithResponse( + resourceGroupName, applicationGroupName, applicationName, application, Context.NONE) + .getValue(); } /** @@ -517,7 +522,7 @@ public Response createOrUpdateWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( + private Mono> deleteWithResponseAsync( String resourceGroupName, String applicationGroupName, String applicationName) { if (this.client.getEndpoint() == null) { return Mono @@ -625,7 +630,7 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String applicationGroupName, String applicationName) { + private Mono deleteAsync(String resourceGroupName, String applicationGroupName, String applicationName) { return deleteWithResponseAsync(resourceGroupName, applicationGroupName, applicationName) .flatMap(ignored -> Mono.empty()); } @@ -636,13 +641,16 @@ public Mono deleteAsync(String resourceGroupName, String applicationGroupN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. + * @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 void delete(String resourceGroupName, String applicationGroupName, String applicationName) { - deleteAsync(resourceGroupName, applicationGroupName, applicationName).block(); + public Response deleteWithResponse( + String resourceGroupName, String applicationGroupName, String applicationName, Context context) { + return deleteWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, context).block(); } /** @@ -651,16 +659,13 @@ public void delete(String resourceGroupName, String applicationGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. - * @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 applicationGroupName, String applicationName, Context context) { - return deleteWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, context).block(); + public void delete(String resourceGroupName, String applicationGroupName, String applicationName) { + deleteWithResponse(resourceGroupName, applicationGroupName, applicationName, Context.NONE); } /** @@ -676,7 +681,7 @@ public Response deleteWithResponse( * @return schema for Application properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String applicationGroupName, String applicationName, ApplicationPatch application) { if (this.client.getEndpoint() == null) { return Mono @@ -791,15 +796,15 @@ private Mono> updateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. - * @param application Object containing Application 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 schema for Application properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationPatch application) { + private Mono updateAsync( + String resourceGroupName, String applicationGroupName, String applicationName) { + final ApplicationPatch application = null; return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, application) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -810,17 +815,22 @@ public Mono updateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. + * @param application Object containing Application 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 schema for Application properties on successful completion of {@link Mono}. + * @return schema for Application properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String applicationGroupName, String applicationName) { - final ApplicationPatch application = null; - return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, application) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, + String applicationGroupName, + String applicationName, + ApplicationPatch application, + Context context) { + return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, application, context) + .block(); } /** @@ -837,31 +847,8 @@ public Mono updateAsync( @ServiceMethod(returns = ReturnType.SINGLE) public ApplicationInner update(String resourceGroupName, String applicationGroupName, String applicationName) { final ApplicationPatch application = null; - return updateAsync(resourceGroupName, applicationGroupName, applicationName, application).block(); - } - - /** - * Update an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @param application Object containing Application 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 schema for Application properties along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String applicationGroupName, - String applicationName, - ApplicationPatch application, - Context context) { - return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, application, context) - .block(); + return updateWithResponse(resourceGroupName, applicationGroupName, applicationName, application, Context.NONE) + .getValue(); } /** @@ -869,6 +856,9 @@ public Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -876,7 +866,11 @@ public Response updateWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String applicationGroupName) { + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -908,6 +902,9 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -927,6 +924,9 @@ private Mono> listSinglePageAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -935,7 +935,12 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String applicationGroupName, Context context) { + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -965,6 +970,9 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -978,6 +986,31 @@ private Mono> listSinglePageAsync( null)); } + /** + * List applications. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application 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 applicationList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + /** * List applications. * @@ -989,9 +1022,12 @@ private Mono> listSinglePageAsync( * @return applicationList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String applicationGroupName) { + private PagedFlux listAsync(String resourceGroupName, String applicationGroupName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, applicationGroupName), + () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -1000,6 +1036,9 @@ public PagedFlux listAsync(String resourceGroupName, String ap * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -1008,9 +1047,16 @@ public PagedFlux listAsync(String resourceGroupName, String ap */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String applicationGroupName, Context context) { + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, applicationGroupName, context), + () -> + listSinglePageAsync( + resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -1026,7 +1072,11 @@ private PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String applicationGroupName) { - return new PagedIterable<>(listAsync(resourceGroupName, applicationGroupName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip)); } /** @@ -1034,6 +1084,9 @@ public PagedIterable list(String resourceGroupName, String app * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -1042,14 +1095,21 @@ public PagedIterable list(String resourceGroupName, String app */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String resourceGroupName, String applicationGroupName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, applicationGroupName, context)); + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context)); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1084,7 +1144,8 @@ private Mono> listNextSinglePageAsync(String nex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationsImpl.java index 86913a806770b..acbdfe53b165d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationsImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationsImpl.java @@ -28,15 +28,6 @@ public ApplicationsImpl( this.serviceManager = serviceManager; } - public Application get(String resourceGroupName, String applicationGroupName, String applicationName) { - ApplicationInner inner = this.serviceClient().get(resourceGroupName, applicationGroupName, applicationName); - if (inner != null) { - return new ApplicationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String applicationGroupName, String applicationName, Context context) { Response inner = @@ -52,8 +43,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String applicationGroupName, String applicationName) { - this.serviceClient().delete(resourceGroupName, applicationGroupName, applicationName); + public Application get(String resourceGroupName, String applicationGroupName, String applicationName) { + ApplicationInner inner = this.serviceClient().get(resourceGroupName, applicationGroupName, applicationName); + if (inner != null) { + return new ApplicationImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -63,14 +59,26 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, applicationGroupName, applicationName, context); } + public void delete(String resourceGroupName, String applicationGroupName, String applicationName) { + this.serviceClient().delete(resourceGroupName, applicationGroupName, applicationName); + } + public PagedIterable list(String resourceGroupName, String applicationGroupName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, applicationGroupName); return Utils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String applicationGroupName, Context context) { + public PagedIterable list( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { PagedIterable inner = - this.serviceClient().list(resourceGroupName, applicationGroupName, context); + this + .serviceClient() + .list(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); } 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 c79bb0b58dd03..cd894795de880 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 @@ -119,24 +119,26 @@ public DesktopVirtualizationApiClientBuilder serializerAdapter(SerializerAdapter * @return an instance of DesktopVirtualizationApiClientImpl. */ public DesktopVirtualizationApiClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); DesktopVirtualizationApiClientImpl client = new DesktopVirtualizationApiClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + 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 88fdf33b17020..d10c958adb3c5 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,8 +30,7 @@ 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.ScalingPlanPooledSchedulesClient; import com.azure.resourcemanager.desktopvirtualization.fluent.ScalingPlansClient; import com.azure.resourcemanager.desktopvirtualization.fluent.SessionHostsClient; import com.azure.resourcemanager.desktopvirtualization.fluent.StartMenuItemsClient; @@ -157,6 +156,18 @@ public ScalingPlansClient getScalingPlans() { return this.scalingPlans; } + /** The ScalingPlanPooledSchedulesClient object to access its operations. */ + private final ScalingPlanPooledSchedulesClient scalingPlanPooledSchedules; + + /** + * Gets the ScalingPlanPooledSchedulesClient object to access its operations. + * + * @return the ScalingPlanPooledSchedulesClient object. + */ + public ScalingPlanPooledSchedulesClient getScalingPlanPooledSchedules() { + return this.scalingPlanPooledSchedules; + } + /** The ApplicationGroupsClient object to access its operations. */ private final ApplicationGroupsClient applicationGroups; @@ -265,30 +276,6 @@ public MsixImagesClient getMsixImages() { return this.msixImages; } - /** 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; - } - /** * Initializes an instance of DesktopVirtualizationApiClient client. * @@ -311,10 +298,11 @@ public PrivateLinkResourcesClient getPrivateLinkResources() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-09-03-preview"; + this.apiVersion = "2022-09-09"; this.operations = new OperationsClientImpl(this); this.workspaces = new WorkspacesClientImpl(this); this.scalingPlans = new ScalingPlansClientImpl(this); + this.scalingPlanPooledSchedules = new ScalingPlanPooledSchedulesClientImpl(this); this.applicationGroups = new ApplicationGroupsClientImpl(this); this.startMenuItems = new StartMenuItemsClientImpl(this); this.applications = new ApplicationsClientImpl(this); @@ -324,8 +312,6 @@ public PrivateLinkResourcesClient getPrivateLinkResources() { this.sessionHosts = new SessionHostsClientImpl(this); this.msixPackages = new MsixPackagesClientImpl(this); this.msixImages = new MsixImagesClientImpl(this); - this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); - this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); } /** diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopsClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopsClientImpl.java index cffd4401bd9c2..be3cfc73ee3de 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopsClientImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopsClientImpl.java @@ -103,6 +103,9 @@ Mono> list( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("applicationGroupName") String applicationGroupName, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); @@ -129,7 +132,7 @@ Mono> listNext( * @return a desktop along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String applicationGroupName, String desktopName) { if (this.client.getEndpoint() == null) { return Mono @@ -235,7 +238,7 @@ private Mono> getWithResponseAsync( * @return a desktop on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String applicationGroupName, String desktopName) { + private Mono getAsync(String resourceGroupName, String applicationGroupName, String desktopName) { return getWithResponseAsync(resourceGroupName, applicationGroupName, desktopName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -246,14 +249,16 @@ public Mono getAsync(String resourceGroupName, String applicationG * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param desktopName The name of the desktop within the specified desktop group. + * @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 desktop. + * @return a desktop along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DesktopInner get(String resourceGroupName, String applicationGroupName, String desktopName) { - return getAsync(resourceGroupName, applicationGroupName, desktopName).block(); + public Response getWithResponse( + String resourceGroupName, String applicationGroupName, String desktopName, Context context) { + return getWithResponseAsync(resourceGroupName, applicationGroupName, desktopName, context).block(); } /** @@ -262,16 +267,14 @@ public DesktopInner get(String resourceGroupName, String applicationGroupName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param desktopName The name of the desktop within the specified desktop group. - * @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 desktop along with {@link Response}. + * @return a desktop. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String applicationGroupName, String desktopName, Context context) { - return getWithResponseAsync(resourceGroupName, applicationGroupName, desktopName, context).block(); + public DesktopInner get(String resourceGroupName, String applicationGroupName, String desktopName) { + return getWithResponse(resourceGroupName, applicationGroupName, desktopName, Context.NONE).getValue(); } /** @@ -287,7 +290,7 @@ public Response getWithResponse( * @return schema for Desktop properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String applicationGroupName, String desktopName, DesktopPatch desktop) { if (this.client.getEndpoint() == null) { return Mono @@ -400,15 +403,14 @@ private Mono> updateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param desktopName The name of the desktop within the specified desktop group. - * @param desktop Object containing Desktop 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 schema for Desktop properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String applicationGroupName, String desktopName, DesktopPatch desktop) { + private Mono updateAsync(String resourceGroupName, String applicationGroupName, String desktopName) { + final DesktopPatch desktop = null; return updateWithResponseAsync(resourceGroupName, applicationGroupName, desktopName, desktop) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -419,16 +421,21 @@ public Mono updateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param desktopName The name of the desktop within the specified desktop group. + * @param desktop Object containing Desktop 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 schema for Desktop properties on successful completion of {@link Mono}. + * @return schema for Desktop properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String applicationGroupName, String desktopName) { - final DesktopPatch desktop = null; - return updateWithResponseAsync(resourceGroupName, applicationGroupName, desktopName, desktop) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, + String applicationGroupName, + String desktopName, + DesktopPatch desktop, + Context context) { + return updateWithResponseAsync(resourceGroupName, applicationGroupName, desktopName, desktop, context).block(); } /** @@ -445,30 +452,8 @@ public Mono updateAsync(String resourceGroupName, String applicati @ServiceMethod(returns = ReturnType.SINGLE) public DesktopInner update(String resourceGroupName, String applicationGroupName, String desktopName) { final DesktopPatch desktop = null; - return updateAsync(resourceGroupName, applicationGroupName, desktopName, desktop).block(); - } - - /** - * Update a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop group. - * @param desktop Object containing Desktop 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 schema for Desktop properties along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String applicationGroupName, - String desktopName, - DesktopPatch desktop, - Context context) { - return updateWithResponseAsync(resourceGroupName, applicationGroupName, desktopName, desktop, context).block(); + return updateWithResponse(resourceGroupName, applicationGroupName, desktopName, desktop, Context.NONE) + .getValue(); } /** @@ -476,6 +461,9 @@ public Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -483,7 +471,11 @@ public Response updateWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String applicationGroupName) { + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -515,6 +507,9 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -534,6 +529,9 @@ private Mono> listSinglePageAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -542,7 +540,12 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String applicationGroupName, Context context) { + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -572,6 +575,9 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -585,6 +591,31 @@ private Mono> listSinglePageAsync( null)); } + /** + * List desktops. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application 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 desktopList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + /** * List desktops. * @@ -596,9 +627,12 @@ private Mono> listSinglePageAsync( * @return desktopList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String applicationGroupName) { + private PagedFlux listAsync(String resourceGroupName, String applicationGroupName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, applicationGroupName), + () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -607,6 +641,9 @@ public PagedFlux listAsync(String resourceGroupName, String applic * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -614,9 +651,17 @@ public PagedFlux listAsync(String resourceGroupName, String applic * @return desktopList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String applicationGroupName, Context context) { + private PagedFlux listAsync( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, applicationGroupName, context), + () -> + listSinglePageAsync( + resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -632,7 +677,11 @@ private PagedFlux listAsync(String resourceGroupName, String appli */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String applicationGroupName) { - return new PagedIterable<>(listAsync(resourceGroupName, applicationGroupName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip)); } /** @@ -640,6 +689,9 @@ public PagedIterable list(String resourceGroupName, String applica * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -647,14 +699,22 @@ public PagedIterable list(String resourceGroupName, String applica * @return desktopList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String applicationGroupName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, applicationGroupName, context)); + public PagedIterable list( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context)); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -689,7 +749,8 @@ private Mono> listNextSinglePageAsync(String nextLin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopsImpl.java index eb7ea60e67e40..d0c88cc6d1852 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopsImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopsImpl.java @@ -29,15 +29,6 @@ public DesktopsImpl( this.serviceManager = serviceManager; } - public Desktop get(String resourceGroupName, String applicationGroupName, String desktopName) { - DesktopInner inner = this.serviceClient().get(resourceGroupName, applicationGroupName, desktopName); - if (inner != null) { - return new DesktopImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String applicationGroupName, String desktopName, Context context) { Response inner = @@ -53,8 +44,8 @@ public Response getWithResponse( } } - public Desktop update(String resourceGroupName, String applicationGroupName, String desktopName) { - DesktopInner inner = this.serviceClient().update(resourceGroupName, applicationGroupName, desktopName); + public Desktop get(String resourceGroupName, String applicationGroupName, String desktopName) { + DesktopInner inner = this.serviceClient().get(resourceGroupName, applicationGroupName, desktopName); if (inner != null) { return new DesktopImpl(inner, this.manager()); } else { @@ -83,13 +74,31 @@ public Response updateWithResponse( } } + public Desktop update(String resourceGroupName, String applicationGroupName, String desktopName) { + DesktopInner inner = this.serviceClient().update(resourceGroupName, applicationGroupName, desktopName); + if (inner != null) { + return new DesktopImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable list(String resourceGroupName, String applicationGroupName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, applicationGroupName); return Utils.mapPage(inner, inner1 -> new DesktopImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String applicationGroupName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, applicationGroupName, context); + public PagedIterable list( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + PagedIterable inner = + this + .serviceClient() + .list(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new DesktopImpl(inner1, this.manager())); } 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 37d4afa1e87d4..4327693dd73b2 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 @@ -10,14 +10,14 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.HostPoolInner; import com.azure.resourcemanager.desktopvirtualization.fluent.models.RegistrationInfoInner; +import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdatePatchProperties; +import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdateProperties; 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.LoadBalancerType; -import com.azure.resourcemanager.desktopvirtualization.models.MigrationRequestProperties; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfo; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfoPatch; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; @@ -172,16 +172,12 @@ public Boolean startVMOnConnect() { return this.innerModel().startVMOnConnect(); } - public MigrationRequestProperties migrationRequest() { - return this.innerModel().migrationRequest(); - } - public Boolean cloudPcResource() { return this.innerModel().cloudPcResource(); } - public PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); + public AgentUpdateProperties agentUpdate() { + return this.innerModel().agentUpdate(); } public Region region() { @@ -296,16 +292,16 @@ public HostPool refresh(Context context) { return this; } - public RegistrationInfo retrieveRegistrationToken() { - return serviceManager.hostPools().retrieveRegistrationToken(resourceGroupName, hostPoolName); - } - public Response retrieveRegistrationTokenWithResponse(Context context) { return serviceManager .hostPools() .retrieveRegistrationTokenWithResponse(resourceGroupName, hostPoolName, context); } + public RegistrationInfo retrieveRegistrationToken() { + return serviceManager.hostPools().retrieveRegistrationToken(resourceGroupName, hostPoolName); + } + public HostPoolImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -511,26 +507,21 @@ public HostPoolImpl withStartVMOnConnect(Boolean startVMOnConnect) { } } - public HostPoolImpl withMigrationRequest(MigrationRequestProperties migrationRequest) { - this.innerModel().withMigrationRequest(migrationRequest); + public HostPoolImpl withAgentUpdate(AgentUpdateProperties agentUpdate) { + this.innerModel().withAgentUpdate(agentUpdate); return this; } - public HostPoolImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - if (isInCreateMode()) { - this.innerModel().withPublicNetworkAccess(publicNetworkAccess); - return this; - } else { - this.updateHostPool.withPublicNetworkAccess(publicNetworkAccess); - return this; - } - } - public HostPoolImpl withRegistrationInfo(RegistrationInfoPatch registrationInfo) { this.updateHostPool.withRegistrationInfo(registrationInfo); return this; } + public HostPoolImpl withAgentUpdate(AgentUpdatePatchProperties agentUpdate) { + this.updateHostPool.withAgentUpdate(agentUpdate); + 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/HostPoolPropertiesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolPropertiesImpl.java index 53e13f141db92..fab75fa0e9f41 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 @@ -6,13 +6,12 @@ import com.azure.resourcemanager.desktopvirtualization.fluent.models.HostPoolPropertiesInner; import com.azure.resourcemanager.desktopvirtualization.fluent.models.RegistrationInfoInner; +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.LoadBalancerType; -import com.azure.resourcemanager.desktopvirtualization.models.MigrationRequestProperties; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfo; import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import java.util.Collections; @@ -116,16 +115,12 @@ public Boolean startVMOnConnect() { return this.innerModel().startVMOnConnect(); } - public MigrationRequestProperties migrationRequest() { - return this.innerModel().migrationRequest(); - } - public Boolean cloudPcResource() { return this.innerModel().cloudPcResource(); } - public PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); + public AgentUpdateProperties agentUpdate() { + return this.innerModel().agentUpdate(); } public HostPoolPropertiesInner innerModel() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolsClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolsClientImpl.java index 2d92bea56a975..fd5219efd5602 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolsClientImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolsClientImpl.java @@ -137,6 +137,9 @@ Mono> listByResourceGroup( @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); @@ -148,6 +151,9 @@ Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); @@ -198,7 +204,7 @@ Mono> listNext( * @return a host pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( + private Mono> getByResourceGroupWithResponseAsync( String resourceGroupName, String hostPoolName) { if (this.client.getEndpoint() == null) { return Mono @@ -292,7 +298,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @return a host pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String hostPoolName) { + private Mono getByResourceGroupAsync(String resourceGroupName, String hostPoolName) { return getByResourceGroupWithResponseAsync(resourceGroupName, hostPoolName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -302,14 +308,16 @@ public Mono getByResourceGroupAsync(String resourceGroupName, Str * * @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 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 host pool. + * @return a host pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HostPoolInner getByResourceGroup(String resourceGroupName, String hostPoolName) { - return getByResourceGroupAsync(resourceGroupName, hostPoolName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String hostPoolName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, hostPoolName, context).block(); } /** @@ -317,16 +325,14 @@ public HostPoolInner getByResourceGroup(String resourceGroupName, String hostPoo * * @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 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 host pool along with {@link Response}. + * @return a host pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String hostPoolName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, hostPoolName, context).block(); + public HostPoolInner getByResourceGroup(String resourceGroupName, String hostPoolName) { + return getByResourceGroupWithResponse(resourceGroupName, hostPoolName, Context.NONE).getValue(); } /** @@ -341,7 +347,7 @@ public Response getByResourceGroupWithResponse( * @return represents a HostPool definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String hostPoolName, HostPoolInner hostPool) { if (this.client.getEndpoint() == null) { return Mono @@ -449,7 +455,7 @@ private Mono> createOrUpdateWithResponseAsync( * @return represents a HostPool definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String hostPoolName, HostPoolInner hostPool) { return createOrUpdateWithResponseAsync(resourceGroupName, hostPoolName, hostPool) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -461,14 +467,16 @@ public Mono createOrUpdateAsync( * @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 hostPool Object containing HostPool 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 HostPool definition. + * @return represents a HostPool definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HostPoolInner createOrUpdate(String resourceGroupName, String hostPoolName, HostPoolInner hostPool) { - return createOrUpdateAsync(resourceGroupName, hostPoolName, hostPool).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String hostPoolName, HostPoolInner hostPool, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, hostPoolName, hostPool, context).block(); } /** @@ -477,16 +485,14 @@ public HostPoolInner createOrUpdate(String resourceGroupName, String hostPoolNam * @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 hostPool Object containing HostPool 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 HostPool definition along with {@link Response}. + * @return represents a HostPool definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String hostPoolName, HostPoolInner hostPool, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, hostPoolName, hostPool, context).block(); + public HostPoolInner createOrUpdate(String resourceGroupName, String hostPoolName, HostPoolInner hostPool) { + return createOrUpdateWithResponse(resourceGroupName, hostPoolName, hostPool, Context.NONE).getValue(); } /** @@ -501,7 +507,7 @@ public Response createOrUpdateWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, Boolean force) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, Boolean force) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -591,14 +597,14 @@ private Mono> deleteWithResponseAsync( * * @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 force Force flag to delete sessionHost. * @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 hostPoolName, Boolean force) { + private Mono deleteAsync(String resourceGroupName, String hostPoolName) { + final Boolean force = null; return deleteWithResponseAsync(resourceGroupName, hostPoolName, force).flatMap(ignored -> Mono.empty()); } @@ -607,15 +613,17 @@ public Mono deleteAsync(String resourceGroupName, String hostPoolName, Boo * * @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 force Force flag to delete sessionHost. + * @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 {@link Mono} that completes when a successful response is received. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String hostPoolName) { - final Boolean force = null; - return deleteWithResponseAsync(resourceGroupName, hostPoolName, force).flatMap(ignored -> Mono.empty()); + public Response deleteWithResponse( + String resourceGroupName, String hostPoolName, Boolean force, Context context) { + return deleteWithResponseAsync(resourceGroupName, hostPoolName, force, context).block(); } /** @@ -630,25 +638,7 @@ public Mono deleteAsync(String resourceGroupName, String hostPoolName) { @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String hostPoolName) { final Boolean force = null; - deleteAsync(resourceGroupName, hostPoolName, force).block(); - } - - /** - * Remove a host pool. - * - * @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 force Force flag to delete sessionHost. - * @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 hostPoolName, Boolean force, Context context) { - return deleteWithResponseAsync(resourceGroupName, hostPoolName, force, context).block(); + deleteWithResponse(resourceGroupName, hostPoolName, force, Context.NONE); } /** @@ -663,7 +653,7 @@ public Response deleteWithResponse( * @return represents a HostPool definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String hostPoolName, HostPoolPatch hostPool) { if (this.client.getEndpoint() == null) { return Mono @@ -760,14 +750,14 @@ private Mono> updateWithResponseAsync( * * @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 hostPool Object containing HostPool 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 HostPool definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String hostPoolName, HostPoolPatch hostPool) { + private Mono updateAsync(String resourceGroupName, String hostPoolName) { + final HostPoolPatch hostPool = null; return updateWithResponseAsync(resourceGroupName, hostPoolName, hostPool) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -777,16 +767,17 @@ public Mono updateAsync(String resourceGroupName, String 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 hostPool Object containing HostPool 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 HostPool definition on successful completion of {@link Mono}. + * @return represents a HostPool definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String hostPoolName) { - final HostPoolPatch hostPool = null; - return updateWithResponseAsync(resourceGroupName, hostPoolName, hostPool) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, String hostPoolName, HostPoolPatch hostPool, Context context) { + return updateWithResponseAsync(resourceGroupName, hostPoolName, hostPool, context).block(); } /** @@ -802,38 +793,24 @@ public Mono updateAsync(String resourceGroupName, String hostPool @ServiceMethod(returns = ReturnType.SINGLE) public HostPoolInner update(String resourceGroupName, String hostPoolName) { final HostPoolPatch hostPool = null; - return updateAsync(resourceGroupName, hostPoolName, hostPool).block(); - } - - /** - * Update a host pool. - * - * @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 hostPool Object containing HostPool 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 HostPool definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String hostPoolName, HostPoolPatch hostPool, Context context) { - return updateWithResponseAsync(resourceGroupName, hostPoolName, hostPool, context).block(); + return updateWithResponse(resourceGroupName, hostPoolName, hostPool, Context.NONE).getValue(); } /** * List hostPools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 hostPoolList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -860,6 +837,9 @@ private Mono> listByResourceGroupSinglePageAsync(St this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -878,6 +858,9 @@ private Mono> listByResourceGroupSinglePageAsync(St * List hostPools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. @@ -886,7 +869,7 @@ private Mono> listByResourceGroupSinglePageAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -911,6 +894,9 @@ private Mono> listByResourceGroupSinglePageAsync( this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -928,15 +914,19 @@ private Mono> listByResourceGroupSinglePageAsync( * List hostPools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 hostPoolList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } @@ -944,6 +934,28 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupNam * List hostPools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 hostPoolList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List hostPools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. @@ -951,9 +963,10 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupNam * @return hostPoolList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } @@ -968,13 +981,19 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, pageSize, isDescending, initialSkip)); } /** * List hostPools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. @@ -982,19 +1001,26 @@ public PagedIterable listByResourceGroup(String resourceGroupName * @return hostPoolList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + public PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedIterable<>( + listByResourceGroupAsync(resourceGroupName, pageSize, isDescending, initialSkip, context)); } /** * List hostPools in subscription. * + * @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 hostPoolList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono> listSinglePageAsync( + Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1016,6 +1042,9 @@ private Mono> listSinglePageAsync() { this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -1033,6 +1062,9 @@ private Mono> listSinglePageAsync() { /** * List hostPools in subscription. * + * @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. @@ -1040,7 +1072,8 @@ private Mono> listSinglePageAsync() { * @return hostPoolList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono> listSinglePageAsync( + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1060,6 +1093,9 @@ private Mono> listSinglePageAsync(Context context) this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -1076,18 +1112,44 @@ private Mono> listSinglePageAsync(Context context) /** * List hostPools in subscription. * + * @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 hostPoolList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * List hostPools in subscription. * + * @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 hostPoolList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List hostPools in subscription. + * + * @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. @@ -1095,9 +1157,11 @@ public PagedFlux listAsync() { * @return hostPoolList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { + private PagedFlux listAsync( + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + () -> listSinglePageAsync(pageSize, isDescending, initialSkip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** @@ -1109,12 +1173,18 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listAsync(pageSize, isDescending, initialSkip)); } /** * List hostPools in subscription. * + * @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. @@ -1122,8 +1192,9 @@ public PagedIterable list() { * @return hostPoolList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + public PagedIterable list( + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedIterable<>(listAsync(pageSize, isDescending, initialSkip, context)); } /** @@ -1138,7 +1209,7 @@ public PagedIterable list(Context context) { * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> retrieveRegistrationTokenWithResponseAsync( + private Mono> retrieveRegistrationTokenWithResponseAsync( String resourceGroupName, String hostPoolName) { if (this.client.getEndpoint() == null) { return Mono @@ -1233,7 +1304,7 @@ private Mono> retrieveRegistrationTokenWithRespo * @return represents a RegistrationInfo definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono retrieveRegistrationTokenAsync(String resourceGroupName, String hostPoolName) { + private Mono retrieveRegistrationTokenAsync(String resourceGroupName, String hostPoolName) { return retrieveRegistrationTokenWithResponseAsync(resourceGroupName, hostPoolName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1243,14 +1314,16 @@ public Mono retrieveRegistrationTokenAsync(String resourc * * @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 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 RegistrationInfo definition. + * @return represents a RegistrationInfo definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RegistrationInfoInner retrieveRegistrationToken(String resourceGroupName, String hostPoolName) { - return retrieveRegistrationTokenAsync(resourceGroupName, hostPoolName).block(); + public Response retrieveRegistrationTokenWithResponse( + String resourceGroupName, String hostPoolName, Context context) { + return retrieveRegistrationTokenWithResponseAsync(resourceGroupName, hostPoolName, context).block(); } /** @@ -1258,22 +1331,21 @@ public RegistrationInfoInner retrieveRegistrationToken(String resourceGroupName, * * @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 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 RegistrationInfo definition along with {@link Response}. + * @return represents a RegistrationInfo definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response retrieveRegistrationTokenWithResponse( - String resourceGroupName, String hostPoolName, Context context) { - return retrieveRegistrationTokenWithResponseAsync(resourceGroupName, hostPoolName, context).block(); + public RegistrationInfoInner retrieveRegistrationToken(String resourceGroupName, String hostPoolName) { + return retrieveRegistrationTokenWithResponse(resourceGroupName, hostPoolName, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1309,7 +1381,8 @@ private Mono> listByResourceGroupNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1346,7 +1419,8 @@ private Mono> listByResourceGroupNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1381,7 +1455,8 @@ private Mono> listNextSinglePageAsync(String nextLi /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolsImpl.java index ef0119b4f39c9..7ae460fcf6fa6 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolsImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolsImpl.java @@ -30,15 +30,6 @@ public HostPoolsImpl( this.serviceManager = serviceManager; } - public HostPool getByResourceGroup(String resourceGroupName, String hostPoolName) { - HostPoolInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, hostPoolName); - if (inner != null) { - return new HostPoolImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String hostPoolName, Context context) { Response inner = @@ -54,8 +45,13 @@ public Response getByResourceGroupWithResponse( } } - public void delete(String resourceGroupName, String hostPoolName) { - this.serviceClient().delete(resourceGroupName, hostPoolName); + public HostPool getByResourceGroup(String resourceGroupName, String hostPoolName) { + HostPoolInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, hostPoolName); + if (inner != null) { + return new HostPoolImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -63,13 +59,19 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, hostPoolName, force, context); } + public void delete(String resourceGroupName, String hostPoolName) { + this.serviceClient().delete(resourceGroupName, hostPoolName); + } + public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return Utils.mapPage(inner, inner1 -> new HostPoolImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + public PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new HostPoolImpl(inner1, this.manager())); } @@ -78,20 +80,11 @@ public PagedIterable list() { return Utils.mapPage(inner, inner1 -> new HostPoolImpl(inner1, this.manager())); } - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); + public PagedIterable list(Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + PagedIterable inner = this.serviceClient().list(pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new HostPoolImpl(inner1, this.manager())); } - public RegistrationInfo retrieveRegistrationToken(String resourceGroupName, String hostPoolName) { - RegistrationInfoInner inner = this.serviceClient().retrieveRegistrationToken(resourceGroupName, hostPoolName); - if (inner != null) { - return new RegistrationInfoImpl(inner, this.manager()); - } else { - return null; - } - } - public Response retrieveRegistrationTokenWithResponse( String resourceGroupName, String hostPoolName, Context context) { Response inner = @@ -107,6 +100,15 @@ public Response retrieveRegistrationTokenWithResponse( } } + public RegistrationInfo retrieveRegistrationToken(String resourceGroupName, String hostPoolName) { + RegistrationInfoInner inner = this.serviceClient().retrieveRegistrationToken(resourceGroupName, hostPoolName); + if (inner != null) { + return new RegistrationInfoImpl(inner, this.manager()); + } else { + return null; + } + } + public HostPool getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixImagesClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixImagesClientImpl.java index 2bfa54bba784c..e94a1140ff072 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixImagesClientImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixImagesClientImpl.java @@ -224,7 +224,7 @@ private Mono> expandSinglePageAsync( * @return expandMsixImageList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux expandAsync( + private PagedFlux expandAsync( String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri) { return new PagedFlux<>( () -> expandSinglePageAsync(resourceGroupName, hostPoolName, msixImageUri), @@ -289,7 +289,8 @@ public PagedIterable expand( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -324,7 +325,8 @@ private Mono> expandNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackagesClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackagesClientImpl.java index 59c816ef50c02..a88ced451c843 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackagesClientImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackagesClientImpl.java @@ -139,6 +139,9 @@ Mono> list( @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); @@ -165,7 +168,7 @@ Mono> listNext( * @return a msixpackage along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String hostPoolName, String msixPackageFullName) { if (this.client.getEndpoint() == null) { return Mono @@ -271,7 +274,7 @@ private Mono> getWithResponseAsync( * @return a msixpackage on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName) { + private Mono getAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName) { return getWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -282,14 +285,16 @@ public Mono getAsync(String resourceGroupName, String 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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. + * @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 msixpackage. + * @return a msixpackage along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MsixPackageInner get(String resourceGroupName, String hostPoolName, String msixPackageFullName) { - return getAsync(resourceGroupName, hostPoolName, msixPackageFullName).block(); + public Response getWithResponse( + String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context) { + return getWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, context).block(); } /** @@ -298,16 +303,14 @@ public MsixPackageInner get(String resourceGroupName, String hostPoolName, Strin * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @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 msixpackage along with {@link Response}. + * @return a msixpackage. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context) { - return getWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, context).block(); + public MsixPackageInner get(String resourceGroupName, String hostPoolName, String msixPackageFullName) { + return getWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, Context.NONE).getValue(); } /** @@ -323,7 +326,7 @@ public Response getWithResponse( * @return schema for MSIX Package properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage) { if (this.client.getEndpoint() == null) { return Mono @@ -447,7 +450,7 @@ private Mono> createOrUpdateWithResponseAsync( * @return schema for MSIX Package properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage) { return createOrUpdateWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -460,15 +463,22 @@ public Mono createOrUpdateAsync( * @param hostPoolName The name of the host pool within the specified resource group. * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. * @param msixPackage Object containing MSIX Package 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 schema for MSIX Package properties. + * @return schema for MSIX Package properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MsixPackageInner createOrUpdate( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage) { - return createOrUpdateAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String hostPoolName, + String msixPackageFullName, + MsixPackageInner msixPackage, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, context) + .block(); } /** @@ -478,22 +488,17 @@ public MsixPackageInner createOrUpdate( * @param hostPoolName The name of the host pool within the specified resource group. * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. * @param msixPackage Object containing MSIX Package 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 schema for MSIX Package properties along with {@link Response}. + * @return schema for MSIX Package properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String hostPoolName, - String msixPackageFullName, - MsixPackageInner msixPackage, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, context) - .block(); + public MsixPackageInner createOrUpdate( + String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage) { + return createOrUpdateWithResponse( + resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, Context.NONE) + .getValue(); } /** @@ -508,7 +513,7 @@ public Response createOrUpdateWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( + private Mono> deleteWithResponseAsync( String resourceGroupName, String hostPoolName, String msixPackageFullName) { if (this.client.getEndpoint() == null) { return Mono @@ -614,7 +619,7 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName) { + private Mono deleteAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName) { return deleteWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName) .flatMap(ignored -> Mono.empty()); } @@ -625,13 +630,16 @@ public Mono deleteAsync(String resourceGroupName, String hostPoolName, Str * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. + * @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 void delete(String resourceGroupName, String hostPoolName, String msixPackageFullName) { - deleteAsync(resourceGroupName, hostPoolName, msixPackageFullName).block(); + public Response deleteWithResponse( + String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context) { + return deleteWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, context).block(); } /** @@ -640,16 +648,13 @@ public void delete(String resourceGroupName, String hostPoolName, String msixPac * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @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 hostPoolName, String msixPackageFullName, Context context) { - return deleteWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, context).block(); + public void delete(String resourceGroupName, String hostPoolName, String msixPackageFullName) { + deleteWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, Context.NONE); } /** @@ -665,7 +670,7 @@ public Response deleteWithResponse( * @return schema for MSIX Package properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackagePatch msixPackage) { if (this.client.getEndpoint() == null) { return Mono @@ -778,15 +783,15 @@ private Mono> updateWithResponseAsync( * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param msixPackage Object containing MSIX Package 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 schema for MSIX Package properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackagePatch msixPackage) { + private Mono updateAsync( + String resourceGroupName, String hostPoolName, String msixPackageFullName) { + final MsixPackagePatch msixPackage = null; return updateWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -797,17 +802,22 @@ public Mono updateAsync( * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. + * @param msixPackage Object containing MSIX Package 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 schema for MSIX Package properties on successful completion of {@link Mono}. + * @return schema for MSIX Package properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName) { - final MsixPackagePatch msixPackage = null; - return updateWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, + String hostPoolName, + String msixPackageFullName, + MsixPackagePatch msixPackage, + Context context) { + return updateWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, context) + .block(); } /** @@ -824,31 +834,8 @@ public Mono updateAsync( @ServiceMethod(returns = ReturnType.SINGLE) public MsixPackageInner update(String resourceGroupName, String hostPoolName, String msixPackageFullName) { final MsixPackagePatch msixPackage = null; - return updateAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage).block(); - } - - /** - * Update an MSIX Package. - * - * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param msixPackage Object containing MSIX Package 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 schema for MSIX Package properties along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String hostPoolName, - String msixPackageFullName, - MsixPackagePatch msixPackage, - Context context) { - return updateWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, context) - .block(); + return updateWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, Context.NONE) + .getValue(); } /** @@ -856,13 +843,17 @@ public Response updateWithResponse( * * @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 msixPackageList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String hostPoolName) { + private Mono> listSinglePageAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -893,6 +884,9 @@ private Mono> listSinglePageAsync(String resourc this.client.getSubscriptionId(), resourceGroupName, hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -912,6 +906,9 @@ private Mono> listSinglePageAsync(String resourc * * @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. @@ -920,7 +917,12 @@ private Mono> listSinglePageAsync(String resourc */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String hostPoolName, Context context) { + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -949,6 +951,9 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -967,15 +972,20 @@ private Mono> listSinglePageAsync( * * @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 msixPackageList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String hostPoolName) { + private PagedFlux listAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, hostPoolName), nextLink -> listNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -983,6 +993,29 @@ public PagedFlux listAsync(String resourceGroupName, String ho * * @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 msixPackageList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List MSIX packages in 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. @@ -990,9 +1023,15 @@ public PagedFlux listAsync(String resourceGroupName, String ho * @return msixPackageList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String hostPoolName, Context context) { + private PagedFlux listAsync( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, hostPoolName, context), + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -1008,7 +1047,10 @@ private PagedFlux listAsync(String resourceGroupName, String h */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String hostPoolName) { - return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip)); } /** @@ -1016,6 +1058,9 @@ public PagedIterable list(String resourceGroupName, String hos * * @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. @@ -1023,14 +1068,22 @@ public PagedIterable list(String resourceGroupName, String hos * @return msixPackageList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String hostPoolName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName, context)); + public PagedIterable list( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context)); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1065,7 +1118,8 @@ private Mono> listNextSinglePageAsync(String nex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackagesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackagesImpl.java index cbcacf612943d..ab3fad5320b7d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackagesImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackagesImpl.java @@ -28,15 +28,6 @@ public MsixPackagesImpl( this.serviceManager = serviceManager; } - public MsixPackage get(String resourceGroupName, String hostPoolName, String msixPackageFullName) { - MsixPackageInner inner = this.serviceClient().get(resourceGroupName, hostPoolName, msixPackageFullName); - if (inner != null) { - return new MsixPackageImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context) { Response inner = @@ -52,8 +43,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String hostPoolName, String msixPackageFullName) { - this.serviceClient().delete(resourceGroupName, hostPoolName, msixPackageFullName); + public MsixPackage get(String resourceGroupName, String hostPoolName, String msixPackageFullName) { + MsixPackageInner inner = this.serviceClient().get(resourceGroupName, hostPoolName, msixPackageFullName); + if (inner != null) { + return new MsixPackageImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -61,13 +57,24 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, context); } + public void delete(String resourceGroupName, String hostPoolName, String msixPackageFullName) { + this.serviceClient().delete(resourceGroupName, hostPoolName, msixPackageFullName); + } + public PagedIterable list(String resourceGroupName, String hostPoolName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, hostPoolName); return Utils.mapPage(inner, inner1 -> new MsixPackageImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String hostPoolName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, hostPoolName, context); + public PagedIterable list( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new MsixPackageImpl(inner1, this.manager())); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/OperationsClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/OperationsClientImpl.java index 84fb0a66dcda4..c0a972b3df096 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/OperationsClientImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/OperationsClientImpl.java @@ -150,7 +150,7 @@ private Mono> listSinglePageAsync( * @return result of the request to list operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { + private PagedFlux listAsync() { return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -198,7 +198,8 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -234,7 +235,8 @@ private Mono> listNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. 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 deleted file mode 100644 index 56039e66e293a..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionWithSystemDataImpl.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.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 deleted file mode 100644 index df76637056b8f..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsClientImpl.java +++ /dev/null @@ -1,1836 +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.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") - private interface PrivateEndpointConnectionsService { - @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, - @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( - "/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("{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); - - @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); - } - - /** - * 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 along with {@link - * PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, String hostPoolName) { - 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, - 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 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, 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, - 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. - * @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) { - return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName), - 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 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, Context context) { - return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, 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) { - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, 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 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, Context context) { - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, hostPoolName, 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. - * @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 getByHostPoolAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName).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. - * @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(); - } - - /** - * 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. - * @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) { - deleteByHostPoolAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName).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. - * @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(); - } - - /** - * 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. - * @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 updateByHostPoolAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName, connection) - .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. - * @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(); - } - - /** - * 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. - * @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 getByWorkspaceAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).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. - * @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(); - } - - /** - * 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. - * @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) { - deleteByWorkspaceAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).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. - * @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(); - } - - /** - * 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. - * @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 updateByWorkspaceAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, connection) - .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. - * @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(); - } - - /** - * Get the next page of items. - * - * @param nextLink 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 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)); - } - - /** - * Get the next page of items. - * - * @param nextLink 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 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)); - } -} 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 deleted file mode 100644 index e15b089cea562..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsImpl.java +++ /dev/null @@ -1,222 +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.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 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, Context context) { - PagedIterable inner = - this.serviceClient().listByHostPool(resourceGroupName, hostPoolName, context); - return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager())); - } - - 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 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 void deleteByHostPool(String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { - this.serviceClient().deleteByHostPool(resourceGroupName, hostPoolName, privateEndpointConnectionName); - } - - public Response deleteByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { - return this - .serviceClient() - .deleteByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, context); - } - - 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; - } - } - - 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 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 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 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 void deleteByWorkspace( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - this.serviceClient().deleteByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName); - } - - public Response deleteByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return this - .serviceClient() - .deleteByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - } - - 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 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; - } - } - - 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 deleted file mode 100644 index 5719a5128e9ec..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourceImpl.java +++ /dev/null @@ -1,65 +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.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 deleted file mode 100644 index 366e5091e67f7..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesClientImpl.java +++ /dev/null @@ -1,622 +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.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") - private interface PrivateLinkResourcesService { - @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, - @HeaderParam("Accept") String accept, - Context context); - - @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, - @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); - - @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); - } - - /** - * 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 along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, String hostPoolName) { - 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, - 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 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, 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, - 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. - * @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) { - return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName), - 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 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, Context context) { - return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, 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) { - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, 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 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, Context context) { - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, hostPoolName, 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 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 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 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, 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 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) { - return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName), - 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 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, Context context) { - return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, 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) { - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, 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 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, Context context) { - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink 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 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)); - } - - /** - * Get the next page of items. - * - * @param nextLink 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 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)); - } -} 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 deleted file mode 100644 index 9a481c35d18a5..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesImpl.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.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 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, Context context) { - PagedIterable inner = - this.serviceClient().listByHostPool(resourceGroupName, hostPoolName, context); - return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); - } - - 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, Context context) { - PagedIterable inner = - this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, 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/ScalingPlanImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanImpl.java index 9c03244db6596..0a9b66424d622 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanImpl.java @@ -242,6 +242,16 @@ public ScalingPlanImpl withRegion(String location) { return this; } + public ScalingPlanImpl withTimeZone(String timeZone) { + if (isInCreateMode()) { + this.innerModel().withTimeZone(timeZone); + return this; + } else { + this.updateScalingPlan.withTimeZone(timeZone); + return this; + } + } + public ScalingPlanImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); @@ -297,16 +307,6 @@ public ScalingPlanImpl withFriendlyName(String friendlyName) { } } - public ScalingPlanImpl withTimeZone(String timeZone) { - if (isInCreateMode()) { - this.innerModel().withTimeZone(timeZone); - return this; - } else { - this.updateScalingPlan.withTimeZone(timeZone); - return this; - } - } - public ScalingPlanImpl withHostPoolType(ScalingHostPoolType hostPoolType) { this.innerModel().withHostPoolType(hostPoolType); return this; diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPooledScheduleImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPooledScheduleImpl.java new file mode 100644 index 0000000000000..7de704344ce74 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPooledScheduleImpl.java @@ -0,0 +1,407 @@ +// 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.ScalingPlanPooledScheduleInner; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedule; +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.Collections; +import java.util.List; + +public final class ScalingPlanPooledScheduleImpl + implements ScalingPlanPooledSchedule, ScalingPlanPooledSchedule.Definition, ScalingPlanPooledSchedule.Update { + private ScalingPlanPooledScheduleInner 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 SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm() { + return this.innerModel().rampUpLoadBalancingAlgorithm(); + } + + public Integer rampUpMinimumHostsPct() { + return this.innerModel().rampUpMinimumHostsPct(); + } + + public Integer rampUpCapacityThresholdPct() { + return this.innerModel().rampUpCapacityThresholdPct(); + } + + public Time peakStartTime() { + return this.innerModel().peakStartTime(); + } + + public SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm() { + return this.innerModel().peakLoadBalancingAlgorithm(); + } + + public Time rampDownStartTime() { + return this.innerModel().rampDownStartTime(); + } + + public SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm() { + return this.innerModel().rampDownLoadBalancingAlgorithm(); + } + + public Integer rampDownMinimumHostsPct() { + return this.innerModel().rampDownMinimumHostsPct(); + } + + public Integer rampDownCapacityThresholdPct() { + return this.innerModel().rampDownCapacityThresholdPct(); + } + + public Boolean rampDownForceLogoffUsers() { + return this.innerModel().rampDownForceLogoffUsers(); + } + + public StopHostsWhen rampDownStopHostsWhen() { + return this.innerModel().rampDownStopHostsWhen(); + } + + public Integer rampDownWaitTimeMinutes() { + return this.innerModel().rampDownWaitTimeMinutes(); + } + + public String rampDownNotificationMessage() { + return this.innerModel().rampDownNotificationMessage(); + } + + public Time offPeakStartTime() { + return this.innerModel().offPeakStartTime(); + } + + public SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm() { + return this.innerModel().offPeakLoadBalancingAlgorithm(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ScalingPlanPooledScheduleInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String scalingPlanName; + + private String scalingPlanScheduleName; + + private ScalingPlanPooledSchedulePatch updateScalingPlanSchedule; + + public ScalingPlanPooledScheduleImpl withExistingScalingPlan(String resourceGroupName, String scalingPlanName) { + this.resourceGroupName = resourceGroupName; + this.scalingPlanName = scalingPlanName; + return this; + } + + public ScalingPlanPooledSchedule create() { + this.innerObject = + serviceManager + .serviceClient() + .getScalingPlanPooledSchedules() + .createWithResponse( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public ScalingPlanPooledSchedule create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getScalingPlanPooledSchedules() + .createWithResponse( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, this.innerModel(), context) + .getValue(); + return this; + } + + ScalingPlanPooledScheduleImpl( + String name, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + this.innerObject = new ScalingPlanPooledScheduleInner(); + this.serviceManager = serviceManager; + this.scalingPlanScheduleName = name; + } + + public ScalingPlanPooledScheduleImpl update() { + this.updateScalingPlanSchedule = new ScalingPlanPooledSchedulePatch(); + return this; + } + + public ScalingPlanPooledSchedule apply() { + this.innerObject = + serviceManager + .serviceClient() + .getScalingPlanPooledSchedules() + .updateWithResponse( + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + updateScalingPlanSchedule, + Context.NONE) + .getValue(); + return this; + } + + public ScalingPlanPooledSchedule apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getScalingPlanPooledSchedules() + .updateWithResponse( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, updateScalingPlanSchedule, context) + .getValue(); + return this; + } + + ScalingPlanPooledScheduleImpl( + ScalingPlanPooledScheduleInner 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(), "pooledSchedules"); + } + + public ScalingPlanPooledSchedule refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getScalingPlanPooledSchedules() + .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE) + .getValue(); + return this; + } + + public ScalingPlanPooledSchedule refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getScalingPlanPooledSchedules() + .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context) + .getValue(); + return this; + } + + public ScalingPlanPooledScheduleImpl withDaysOfWeek(List daysOfWeek) { + if (isInCreateMode()) { + this.innerModel().withDaysOfWeek(daysOfWeek); + return this; + } else { + this.updateScalingPlanSchedule.withDaysOfWeek(daysOfWeek); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withRampUpStartTime(Time rampUpStartTime) { + if (isInCreateMode()) { + this.innerModel().withRampUpStartTime(rampUpStartTime); + return this; + } else { + this.updateScalingPlanSchedule.withRampUpStartTime(rampUpStartTime); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withRampUpLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm) { + if (isInCreateMode()) { + this.innerModel().withRampUpLoadBalancingAlgorithm(rampUpLoadBalancingAlgorithm); + return this; + } else { + this.updateScalingPlanSchedule.withRampUpLoadBalancingAlgorithm(rampUpLoadBalancingAlgorithm); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withRampUpMinimumHostsPct(Integer rampUpMinimumHostsPct) { + if (isInCreateMode()) { + this.innerModel().withRampUpMinimumHostsPct(rampUpMinimumHostsPct); + return this; + } else { + this.updateScalingPlanSchedule.withRampUpMinimumHostsPct(rampUpMinimumHostsPct); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withRampUpCapacityThresholdPct(Integer rampUpCapacityThresholdPct) { + if (isInCreateMode()) { + this.innerModel().withRampUpCapacityThresholdPct(rampUpCapacityThresholdPct); + return this; + } else { + this.updateScalingPlanSchedule.withRampUpCapacityThresholdPct(rampUpCapacityThresholdPct); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withPeakStartTime(Time peakStartTime) { + if (isInCreateMode()) { + this.innerModel().withPeakStartTime(peakStartTime); + return this; + } else { + this.updateScalingPlanSchedule.withPeakStartTime(peakStartTime); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withPeakLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm) { + if (isInCreateMode()) { + this.innerModel().withPeakLoadBalancingAlgorithm(peakLoadBalancingAlgorithm); + return this; + } else { + this.updateScalingPlanSchedule.withPeakLoadBalancingAlgorithm(peakLoadBalancingAlgorithm); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withRampDownStartTime(Time rampDownStartTime) { + if (isInCreateMode()) { + this.innerModel().withRampDownStartTime(rampDownStartTime); + return this; + } else { + this.updateScalingPlanSchedule.withRampDownStartTime(rampDownStartTime); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withRampDownLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm) { + if (isInCreateMode()) { + this.innerModel().withRampDownLoadBalancingAlgorithm(rampDownLoadBalancingAlgorithm); + return this; + } else { + this.updateScalingPlanSchedule.withRampDownLoadBalancingAlgorithm(rampDownLoadBalancingAlgorithm); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withRampDownMinimumHostsPct(Integer rampDownMinimumHostsPct) { + if (isInCreateMode()) { + this.innerModel().withRampDownMinimumHostsPct(rampDownMinimumHostsPct); + return this; + } else { + this.updateScalingPlanSchedule.withRampDownMinimumHostsPct(rampDownMinimumHostsPct); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withRampDownCapacityThresholdPct(Integer rampDownCapacityThresholdPct) { + if (isInCreateMode()) { + this.innerModel().withRampDownCapacityThresholdPct(rampDownCapacityThresholdPct); + return this; + } else { + this.updateScalingPlanSchedule.withRampDownCapacityThresholdPct(rampDownCapacityThresholdPct); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withRampDownForceLogoffUsers(Boolean rampDownForceLogoffUsers) { + if (isInCreateMode()) { + this.innerModel().withRampDownForceLogoffUsers(rampDownForceLogoffUsers); + return this; + } else { + this.updateScalingPlanSchedule.withRampDownForceLogoffUsers(rampDownForceLogoffUsers); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withRampDownStopHostsWhen(StopHostsWhen rampDownStopHostsWhen) { + if (isInCreateMode()) { + this.innerModel().withRampDownStopHostsWhen(rampDownStopHostsWhen); + return this; + } else { + this.updateScalingPlanSchedule.withRampDownStopHostsWhen(rampDownStopHostsWhen); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withRampDownWaitTimeMinutes(Integer rampDownWaitTimeMinutes) { + if (isInCreateMode()) { + this.innerModel().withRampDownWaitTimeMinutes(rampDownWaitTimeMinutes); + return this; + } else { + this.updateScalingPlanSchedule.withRampDownWaitTimeMinutes(rampDownWaitTimeMinutes); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withRampDownNotificationMessage(String rampDownNotificationMessage) { + if (isInCreateMode()) { + this.innerModel().withRampDownNotificationMessage(rampDownNotificationMessage); + return this; + } else { + this.updateScalingPlanSchedule.withRampDownNotificationMessage(rampDownNotificationMessage); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withOffPeakStartTime(Time offPeakStartTime) { + if (isInCreateMode()) { + this.innerModel().withOffPeakStartTime(offPeakStartTime); + return this; + } else { + this.updateScalingPlanSchedule.withOffPeakStartTime(offPeakStartTime); + return this; + } + } + + public ScalingPlanPooledScheduleImpl withOffPeakLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm) { + if (isInCreateMode()) { + this.innerModel().withOffPeakLoadBalancingAlgorithm(offPeakLoadBalancingAlgorithm); + return this; + } else { + this.updateScalingPlanSchedule.withOffPeakLoadBalancingAlgorithm(offPeakLoadBalancingAlgorithm); + 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/ScalingPlanPooledSchedulesClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPooledSchedulesClientImpl.java new file mode 100644 index 0000000000000..14e1b13a52f03 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPooledSchedulesClientImpl.java @@ -0,0 +1,1202 @@ +// 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.ScalingPlanPooledSchedulesClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleInner; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledScheduleList; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedulePatch; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ScalingPlanPooledSchedulesClient. */ +public final class ScalingPlanPooledSchedulesClientImpl implements ScalingPlanPooledSchedulesClient { + /** The proxy service used to perform REST calls. */ + private final ScalingPlanPooledSchedulesService service; + + /** The service client containing this operation class. */ + private final DesktopVirtualizationApiClientImpl client; + + /** + * Initializes an instance of ScalingPlanPooledSchedulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ScalingPlanPooledSchedulesClientImpl(DesktopVirtualizationApiClientImpl client) { + this.service = + RestProxy + .create( + ScalingPlanPooledSchedulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DesktopVirtualizationApiClientScalingPlanPooledSchedules to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DesktopVirtualizatio") + private interface ScalingPlanPooledSchedulesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/pooledSchedules" + + "/{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}/pooledSchedules" + + "/{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") ScalingPlanPooledScheduleInner scalingPlanSchedule, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/pooledSchedules" + + "/{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}/pooledSchedules" + + "/{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") ScalingPlanPooledSchedulePatch scalingPlanSchedule, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/pooledSchedules") + @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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private 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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + return getWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScalingPlanPooledScheduleInner get( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + return getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE).getValue(); + } + + /** + * Create or update a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner 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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner 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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner scalingPlanSchedule) { + return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create or update a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createWithResponse( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner scalingPlanSchedule, + Context context) { + return createWithResponseAsync( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, context) + .block(); + } + + /** + * Create or update a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScalingPlanPooledScheduleInner create( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner scalingPlanSchedule) { + return createWithResponse( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, Context.NONE) + .getValue(); + } + + /** + * Remove a ScalingPlanPooledSchedule. + * + * @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) + private 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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule. + * + * @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) + private Mono deleteAsync(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + return deleteWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Remove a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledSchedulePatch 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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledSchedulePatch 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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + final ScalingPlanPooledSchedulePatch scalingPlanSchedule = null; + return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledSchedulePatch scalingPlanSchedule, + Context context) { + return updateWithResponseAsync( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, context) + .block(); + } + + /** + * Update a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScalingPlanPooledScheduleInner update( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + final ScalingPlanPooledSchedulePatch scalingPlanSchedule = null; + return updateWithResponse( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, Context.NONE) + .getValue(); + } + + /** + * List ScalingPlanPooledSchedules. + * + * @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 scalingPlanPooledScheduleList 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 ScalingPlanPooledSchedules. + * + * @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 scalingPlanPooledScheduleList 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 ScalingPlanPooledSchedules. + * + * @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 scalingPlanPooledScheduleList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private 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 ScalingPlanPooledSchedules. + * + * @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 scalingPlanPooledScheduleList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private 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 ScalingPlanPooledSchedules. + * + * @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 scalingPlanPooledScheduleList 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 ScalingPlanPooledSchedules. + * + * @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 scalingPlanPooledScheduleList 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 ScalingPlanPooledSchedules. + * + * @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 scalingPlanPooledScheduleList 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 scalingPlanPooledScheduleList 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 scalingPlanPooledScheduleList 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/ScalingPlanPooledSchedulesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPooledSchedulesImpl.java new file mode 100644 index 0000000000000..f9fa0d343303a --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPooledSchedulesImpl.java @@ -0,0 +1,207 @@ +// 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.ScalingPlanPooledSchedulesClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleInner; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedule; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedules; + +public final class ScalingPlanPooledSchedulesImpl implements ScalingPlanPooledSchedules { + private static final ClientLogger LOGGER = new ClientLogger(ScalingPlanPooledSchedulesImpl.class); + + private final ScalingPlanPooledSchedulesClient innerClient; + + private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; + + public ScalingPlanPooledSchedulesImpl( + ScalingPlanPooledSchedulesClient 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 ScalingPlanPooledScheduleImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ScalingPlanPooledSchedule get( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + ScalingPlanPooledScheduleInner inner = + this.serviceClient().get(resourceGroupName, scalingPlanName, scalingPlanScheduleName); + if (inner != null) { + return new ScalingPlanPooledScheduleImpl(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 ScalingPlanPooledScheduleImpl(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 ScalingPlanPooledScheduleImpl(inner1, this.manager())); + } + + public ScalingPlanPooledSchedule 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, "pooledSchedules"); + if (scalingPlanScheduleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'pooledSchedules'.", 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, "pooledSchedules"); + if (scalingPlanScheduleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'pooledSchedules'.", 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, "pooledSchedules"); + if (scalingPlanScheduleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'pooledSchedules'.", 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, "pooledSchedules"); + if (scalingPlanScheduleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'pooledSchedules'.", id))); + } + return this.deleteWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context); + } + + private ScalingPlanPooledSchedulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() { + return this.serviceManager; + } + + public ScalingPlanPooledScheduleImpl define(String name) { + return new ScalingPlanPooledScheduleImpl(name, this.manager()); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlansClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlansClientImpl.java index 09f3893d56a87..610d76f28dd95 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlansClientImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlansClientImpl.java @@ -134,6 +134,9 @@ Mono> listByResourceGroup( @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); @@ -145,6 +148,9 @@ Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); @@ -160,6 +166,9 @@ Mono> listByHostPool( @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); @@ -205,7 +214,7 @@ Mono> listByHostPoolNext( * @return a scaling plan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( + private Mono> getByResourceGroupWithResponseAsync( String resourceGroupName, String scalingPlanName) { if (this.client.getEndpoint() == null) { return Mono @@ -301,7 +310,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @return a scaling plan on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String scalingPlanName) { + private Mono getByResourceGroupAsync(String resourceGroupName, String scalingPlanName) { return getByResourceGroupWithResponseAsync(resourceGroupName, scalingPlanName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -311,14 +320,16 @@ public Mono getByResourceGroupAsync(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. + * @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 scaling plan. + * @return a scaling plan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScalingPlanInner getByResourceGroup(String resourceGroupName, String scalingPlanName) { - return getByResourceGroupAsync(resourceGroupName, scalingPlanName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String scalingPlanName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, scalingPlanName, context).block(); } /** @@ -326,16 +337,14 @@ public ScalingPlanInner getByResourceGroup(String resourceGroupName, String scal * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. - * @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 scaling plan along with {@link Response}. + * @return a scaling plan. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String scalingPlanName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, scalingPlanName, context).block(); + public ScalingPlanInner getByResourceGroup(String resourceGroupName, String scalingPlanName) { + return getByResourceGroupWithResponse(resourceGroupName, scalingPlanName, Context.NONE).getValue(); } /** @@ -350,7 +359,7 @@ public Response getByResourceGroupWithResponse( * @return scalingPlan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync( + private Mono> createWithResponseAsync( String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan) { if (this.client.getEndpoint() == null) { return Mono @@ -460,7 +469,7 @@ private Mono> createWithResponseAsync( * @return scalingPlan on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync( + private Mono createAsync( String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan) { return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -472,14 +481,16 @@ public Mono createAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlan Object containing scaling plan 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 scalingPlan. + * @return scalingPlan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScalingPlanInner create(String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan) { - return createAsync(resourceGroupName, scalingPlanName, scalingPlan).block(); + public Response createWithResponse( + String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan, Context context) { + return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan, context).block(); } /** @@ -488,16 +499,14 @@ public ScalingPlanInner create(String resourceGroupName, String scalingPlanName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlan Object containing scaling plan 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 scalingPlan along with {@link Response}. + * @return scalingPlan. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan, Context context) { - return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan, context).block(); + public ScalingPlanInner create(String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan) { + return createWithResponse(resourceGroupName, scalingPlanName, scalingPlan, Context.NONE).getValue(); } /** @@ -511,7 +520,7 @@ public Response createWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String scalingPlanName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String scalingPlanName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -606,7 +615,7 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String scalingPlanName) { + private Mono deleteAsync(String resourceGroupName, String scalingPlanName) { return deleteWithResponseAsync(resourceGroupName, scalingPlanName).flatMap(ignored -> Mono.empty()); } @@ -615,13 +624,15 @@ public Mono deleteAsync(String resourceGroupName, String scalingPlanName) * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. + * @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 void delete(String resourceGroupName, String scalingPlanName) { - deleteAsync(resourceGroupName, scalingPlanName).block(); + public Response deleteWithResponse(String resourceGroupName, String scalingPlanName, Context context) { + return deleteWithResponseAsync(resourceGroupName, scalingPlanName, context).block(); } /** @@ -629,15 +640,13 @@ public void delete(String resourceGroupName, String scalingPlanName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. - * @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, Context context) { - return deleteWithResponseAsync(resourceGroupName, scalingPlanName, context).block(); + public void delete(String resourceGroupName, String scalingPlanName) { + deleteWithResponse(resourceGroupName, scalingPlanName, Context.NONE); } /** @@ -652,7 +661,7 @@ public Response deleteWithResponse(String resourceGroupName, String scalin * @return scalingPlan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan) { if (this.client.getEndpoint() == null) { return Mono @@ -751,15 +760,14 @@ private Mono> updateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. - * @param scalingPlan Object containing scaling plan 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 scalingPlan on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan) { + private Mono updateAsync(String resourceGroupName, String scalingPlanName) { + final ScalingPlanPatch scalingPlan = null; return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -769,16 +777,17 @@ public Mono updateAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. + * @param scalingPlan Object containing scaling plan 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 scalingPlan on successful completion of {@link Mono}. + * @return scalingPlan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String scalingPlanName) { - final ScalingPlanPatch scalingPlan = null; - return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan, Context context) { + return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan, context).block(); } /** @@ -794,38 +803,24 @@ public Mono updateAsync(String resourceGroupName, String scali @ServiceMethod(returns = ReturnType.SINGLE) public ScalingPlanInner update(String resourceGroupName, String scalingPlanName) { final ScalingPlanPatch scalingPlan = null; - return updateAsync(resourceGroupName, scalingPlanName, scalingPlan).block(); - } - - /** - * Update a scaling plan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scalingPlanName The name of the scaling plan. - * @param scalingPlan Object containing scaling plan 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 scalingPlan along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan, Context context) { - return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan, context).block(); + return updateWithResponse(resourceGroupName, scalingPlanName, scalingPlan, Context.NONE).getValue(); } /** * List scaling plans. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 scalingPlanList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -852,6 +847,9 @@ private Mono> listByResourceGroupSinglePageAsync this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -870,6 +868,9 @@ private Mono> listByResourceGroupSinglePageAsync * List scaling plans. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. @@ -878,7 +879,7 @@ private Mono> listByResourceGroupSinglePageAsync */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -903,6 +904,9 @@ private Mono> listByResourceGroupSinglePageAsync this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -916,6 +920,26 @@ private Mono> listByResourceGroupSinglePageAsync null)); } + /** + * List scaling plans. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 scalingPlanList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + /** * List scaling plans. * @@ -926,9 +950,12 @@ private Mono> listByResourceGroupSinglePageAsync * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } @@ -936,6 +963,9 @@ public PagedFlux listByResourceGroupAsync(String resourceGroup * List scaling plans. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. @@ -943,9 +973,10 @@ public PagedFlux listByResourceGroupAsync(String resourceGroup * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } @@ -960,13 +991,19 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, pageSize, isDescending, initialSkip)); } /** * List scaling plans. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. @@ -974,19 +1011,26 @@ public PagedIterable listByResourceGroup(String resourceGroupN * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + public PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedIterable<>( + listByResourceGroupAsync(resourceGroupName, pageSize, isDescending, initialSkip, context)); } /** * List scaling plans in subscription. * + * @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 scalingPlanList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono> listSinglePageAsync( + Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1008,6 +1052,9 @@ private Mono> listSinglePageAsync() { this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -1025,6 +1072,9 @@ private Mono> listSinglePageAsync() { /** * List scaling plans in subscription. * + * @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. @@ -1032,7 +1082,8 @@ private Mono> listSinglePageAsync() { * @return scalingPlanList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono> listSinglePageAsync( + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1052,6 +1103,9 @@ private Mono> listSinglePageAsync(Context contex this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -1068,19 +1122,44 @@ private Mono> listSinglePageAsync(Context contex /** * List scaling plans in subscription. * + * @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 scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { + private PagedFlux listAsync(Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(pageSize, isDescending, initialSkip), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * List scaling plans in subscription. * + * @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 scalingPlanList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(pageSize, isDescending, initialSkip), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List scaling plans in subscription. + * + * @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. @@ -1088,9 +1167,11 @@ public PagedFlux listAsync() { * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { + private PagedFlux listAsync( + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + () -> listSinglePageAsync(pageSize, isDescending, initialSkip, context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** @@ -1102,12 +1183,18 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listAsync(pageSize, isDescending, initialSkip)); } /** * List scaling plans in subscription. * + * @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. @@ -1115,8 +1202,9 @@ public PagedIterable list() { * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + public PagedIterable list( + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedIterable<>(listAsync(pageSize, isDescending, initialSkip, context)); } /** @@ -1124,6 +1212,9 @@ public PagedIterable list(Context context) { * * @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. @@ -1131,7 +1222,7 @@ public PagedIterable list(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, String hostPoolName) { + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1162,6 +1253,9 @@ private Mono> listByHostPoolSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -1181,6 +1275,9 @@ private Mono> listByHostPoolSinglePageAsync( * * @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. @@ -1189,7 +1286,12 @@ private Mono> listByHostPoolSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, String hostPoolName, Context context) { + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1218,6 +1320,9 @@ private Mono> listByHostPoolSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -1231,6 +1336,27 @@ private Mono> listByHostPoolSinglePageAsync( null)); } + /** + * List scaling plan 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 scalingPlanList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private 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 scaling plan associated with hostpool. * @@ -1242,9 +1368,12 @@ private Mono> listByHostPoolSinglePageAsync( * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName) { + private PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName), + () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); } @@ -1253,6 +1382,9 @@ public PagedFlux listByHostPoolAsync(String resourceGroupName, * * @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. @@ -1261,9 +1393,16 @@ public PagedFlux listByHostPoolAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName, Context context) { + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, context), + () -> + listByHostPoolSinglePageAsync( + resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); } @@ -1279,7 +1418,11 @@ private PagedFlux listByHostPoolAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName) { - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, hostPoolName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip)); } /** @@ -1287,6 +1430,9 @@ public PagedIterable listByHostPool(String resourceGroupName, * * @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. @@ -1295,14 +1441,21 @@ public PagedIterable listByHostPool(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName, Context context) { - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, hostPoolName, context)); + 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 nextLink parameter. + * @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. @@ -1338,7 +1491,8 @@ private Mono> listByResourceGroupNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1375,7 +1529,8 @@ private Mono> listByResourceGroupNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1411,7 +1566,8 @@ private Mono> listBySubscriptionNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1448,7 +1604,8 @@ private Mono> listBySubscriptionNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1483,7 +1640,8 @@ private Mono> listByHostPoolNextSinglePageAsync( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlansImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlansImpl.java index bf113f8629a7b..4efb9b748a248 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlansImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlansImpl.java @@ -28,15 +28,6 @@ public ScalingPlansImpl( this.serviceManager = serviceManager; } - public ScalingPlan getByResourceGroup(String resourceGroupName, String scalingPlanName) { - ScalingPlanInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, scalingPlanName); - if (inner != null) { - return new ScalingPlanImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String scalingPlanName, Context context) { Response inner = @@ -52,21 +43,33 @@ public Response getByResourceGroupWithResponse( } } - public void deleteByResourceGroup(String resourceGroupName, String scalingPlanName) { - this.serviceClient().delete(resourceGroupName, scalingPlanName); + public ScalingPlan getByResourceGroup(String resourceGroupName, String scalingPlanName) { + ScalingPlanInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, scalingPlanName); + if (inner != null) { + return new ScalingPlanImpl(inner, this.manager()); + } else { + return null; + } } - public Response deleteWithResponse(String resourceGroupName, String scalingPlanName, Context context) { + public Response deleteByResourceGroupWithResponse( + String resourceGroupName, String scalingPlanName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, scalingPlanName, context); } + public void deleteByResourceGroup(String resourceGroupName, String scalingPlanName) { + this.serviceClient().delete(resourceGroupName, scalingPlanName); + } + public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return Utils.mapPage(inner, inner1 -> new ScalingPlanImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + public PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new ScalingPlanImpl(inner1, this.manager())); } @@ -75,8 +78,9 @@ public PagedIterable list() { return Utils.mapPage(inner, inner1 -> new ScalingPlanImpl(inner1, this.manager())); } - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); + public PagedIterable list( + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + PagedIterable inner = this.serviceClient().list(pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new ScalingPlanImpl(inner1, this.manager())); } @@ -85,9 +89,17 @@ public PagedIterable listByHostPool(String resourceGroupName, Strin return Utils.mapPage(inner, inner1 -> new ScalingPlanImpl(inner1, this.manager())); } - public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName, Context context) { + public PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { PagedIterable inner = - this.serviceClient().listByHostPool(resourceGroupName, hostPoolName, context); + this + .serviceClient() + .listByHostPool(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new ScalingPlanImpl(inner1, this.manager())); } @@ -145,7 +157,7 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id))); } - this.deleteWithResponse(resourceGroupName, scalingPlanName, Context.NONE); + this.deleteByResourceGroupWithResponse(resourceGroupName, scalingPlanName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { @@ -164,7 +176,7 @@ public Response deleteByIdWithResponse(String id, Context context) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id))); } - return this.deleteWithResponse(resourceGroupName, scalingPlanName, context); + return this.deleteByResourceGroupWithResponse(resourceGroupName, scalingPlanName, context); } private ScalingPlansClient serviceClient() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostImpl.java index 3b9a04dabd0f2..ec92cef6f5dcc 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostImpl.java @@ -74,6 +74,10 @@ public String assignedUser() { return this.innerModel().assignedUser(); } + public String friendlyName() { + return this.innerModel().friendlyName(); + } + public Status status() { return this.innerModel().status(); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostsClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostsClientImpl.java index e6e74c542ee23..36fcd8dabdf86 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostsClientImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostsClientImpl.java @@ -123,6 +123,9 @@ Mono> list( @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); @@ -149,7 +152,7 @@ Mono> listNext( * @return a session host along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname) { if (this.client.getEndpoint() == null) { return Mono @@ -255,7 +258,7 @@ private Mono> getWithResponseAsync( * @return a session host on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String hostPoolName, String sessionHostname) { + private Mono getAsync(String resourceGroupName, String hostPoolName, String sessionHostname) { return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -266,14 +269,16 @@ public Mono getAsync(String resourceGroupName, String 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 sessionHostname The name of the session host within the specified host pool. + * @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 session host. + * @return a session host along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SessionHostInner get(String resourceGroupName, String hostPoolName, String sessionHostname) { - return getAsync(resourceGroupName, hostPoolName, sessionHostname).block(); + public Response getWithResponse( + String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { + return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, context).block(); } /** @@ -282,16 +287,14 @@ public SessionHostInner get(String resourceGroupName, String hostPoolName, Strin * @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 sessionHostname The name of the session host within the specified host pool. - * @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 session host along with {@link Response}. + * @return a session host. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { - return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, context).block(); + public SessionHostInner get(String resourceGroupName, String hostPoolName, String sessionHostname) { + return getWithResponse(resourceGroupName, hostPoolName, sessionHostname, Context.NONE).getValue(); } /** @@ -307,7 +310,7 @@ public Response getWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( + private Mono> deleteWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force) { if (this.client.getEndpoint() == null) { return Mono @@ -410,15 +413,14 @@ private Mono> deleteWithResponseAsync( * @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 sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to force sessionHost deletion even when userSession exists. * @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 hostPoolName, String sessionHostname, Boolean force) { + private Mono deleteAsync(String resourceGroupName, String hostPoolName, String sessionHostname) { + final Boolean force = null; return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force) .flatMap(ignored -> Mono.empty()); } @@ -429,16 +431,17 @@ public Mono deleteAsync( * @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 sessionHostname The name of the session host within the specified host pool. + * @param force Force flag to force sessionHost deletion even when userSession exists. + * @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 {@link Mono} that completes when a successful response is received. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String hostPoolName, String sessionHostname) { - final Boolean force = null; - return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force) - .flatMap(ignored -> Mono.empty()); + public Response deleteWithResponse( + String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force, Context context) { + return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, context).block(); } /** @@ -454,26 +457,7 @@ public Mono deleteAsync(String resourceGroupName, String hostPoolName, Str @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String hostPoolName, String sessionHostname) { final Boolean force = null; - deleteAsync(resourceGroupName, hostPoolName, sessionHostname, force).block(); - } - - /** - * Remove a SessionHost. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to force sessionHost deletion even when userSession exists. - * @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 hostPoolName, String sessionHostname, Boolean force, Context context) { - return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, context).block(); + deleteWithResponse(resourceGroupName, hostPoolName, sessionHostname, force, Context.NONE); } /** @@ -490,7 +474,7 @@ public Response deleteWithResponse( * @return represents a SessionHost definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname, @@ -611,20 +595,15 @@ private Mono> updateWithResponseAsync( * @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 sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to update assign, unassign or reassign personal desktop. - * @param sessionHost Object containing SessionHost 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 SessionHost definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Boolean force, - SessionHostPatch sessionHost) { + private Mono updateAsync(String resourceGroupName, String hostPoolName, String sessionHostname) { + final Boolean force = null; + final SessionHostPatch sessionHost = null; return updateWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -635,17 +614,24 @@ public Mono updateAsync( * @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 sessionHostname The name of the session host within the specified host pool. + * @param force Force flag to update assign, unassign or reassign personal desktop. + * @param sessionHost Object containing SessionHost 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 SessionHost definition on successful completion of {@link Mono}. + * @return represents a SessionHost definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String hostPoolName, String sessionHostname) { - final Boolean force = null; - final SessionHostPatch sessionHost = null; - return updateWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Boolean force, + SessionHostPatch sessionHost, + Context context) { + return updateWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost, context) + .block(); } /** @@ -663,33 +649,8 @@ public Mono updateAsync(String resourceGroupName, String hostP public SessionHostInner update(String resourceGroupName, String hostPoolName, String sessionHostname) { final Boolean force = null; final SessionHostPatch sessionHost = null; - return updateAsync(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost).block(); - } - - /** - * Update a session host. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to update assign, unassign or reassign personal desktop. - * @param sessionHost Object containing SessionHost 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 SessionHost definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Boolean force, - SessionHostPatch sessionHost, - Context context) { - return updateWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost, context) - .block(); + return updateWithResponse(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost, Context.NONE) + .getValue(); } /** @@ -697,13 +658,17 @@ public Response updateWithResponse( * * @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 sessionHostList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String hostPoolName) { + private Mono> listSinglePageAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -734,6 +699,9 @@ private Mono> listSinglePageAsync(String resourc this.client.getSubscriptionId(), resourceGroupName, hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -753,6 +721,9 @@ private Mono> listSinglePageAsync(String resourc * * @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. @@ -761,7 +732,12 @@ private Mono> listSinglePageAsync(String resourc */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String hostPoolName, Context context) { + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -790,6 +766,9 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -808,15 +787,20 @@ private Mono> listSinglePageAsync( * * @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 sessionHostList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String hostPoolName) { + private PagedFlux listAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, hostPoolName), nextLink -> listNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -824,6 +808,29 @@ public PagedFlux listAsync(String resourceGroupName, String ho * * @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 sessionHostList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List sessionHosts. + * + * @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. @@ -831,9 +838,15 @@ public PagedFlux listAsync(String resourceGroupName, String ho * @return sessionHostList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String hostPoolName, Context context) { + private PagedFlux listAsync( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, hostPoolName, context), + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -849,7 +862,10 @@ private PagedFlux listAsync(String resourceGroupName, String h */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String hostPoolName) { - return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip)); } /** @@ -857,6 +873,9 @@ public PagedIterable list(String resourceGroupName, String hos * * @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. @@ -864,14 +883,22 @@ public PagedIterable list(String resourceGroupName, String hos * @return sessionHostList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String hostPoolName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName, context)); + public PagedIterable list( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context)); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -906,7 +933,8 @@ private Mono> listNextSinglePageAsync(String nex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostsImpl.java index 0940d7b9fb2cf..14fa001189c61 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostsImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostsImpl.java @@ -29,15 +29,6 @@ public SessionHostsImpl( this.serviceManager = serviceManager; } - public SessionHost get(String resourceGroupName, String hostPoolName, String sessionHostname) { - SessionHostInner inner = this.serviceClient().get(resourceGroupName, hostPoolName, sessionHostname); - if (inner != null) { - return new SessionHostImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { Response inner = @@ -53,8 +44,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String hostPoolName, String sessionHostname) { - this.serviceClient().delete(resourceGroupName, hostPoolName, sessionHostname); + public SessionHost get(String resourceGroupName, String hostPoolName, String sessionHostname) { + SessionHostInner inner = this.serviceClient().get(resourceGroupName, hostPoolName, sessionHostname); + if (inner != null) { + return new SessionHostImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -64,13 +60,8 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, hostPoolName, sessionHostname, force, context); } - public SessionHost update(String resourceGroupName, String hostPoolName, String sessionHostname) { - SessionHostInner inner = this.serviceClient().update(resourceGroupName, hostPoolName, sessionHostname); - if (inner != null) { - return new SessionHostImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String hostPoolName, String sessionHostname) { + this.serviceClient().delete(resourceGroupName, hostPoolName, sessionHostname); } public Response updateWithResponse( @@ -95,13 +86,29 @@ public Response updateWithResponse( } } + public SessionHost update(String resourceGroupName, String hostPoolName, String sessionHostname) { + SessionHostInner inner = this.serviceClient().update(resourceGroupName, hostPoolName, sessionHostname); + if (inner != null) { + return new SessionHostImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable list(String resourceGroupName, String hostPoolName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, hostPoolName); return Utils.mapPage(inner, inner1 -> new SessionHostImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String hostPoolName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, hostPoolName, context); + public PagedIterable list( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new SessionHostImpl(inner1, this.manager())); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemsClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemsClientImpl.java index 5327f63d85f97..cb36d0aadfb63 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemsClientImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemsClientImpl.java @@ -68,6 +68,9 @@ Mono> list( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("applicationGroupName") String applicationGroupName, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); @@ -87,6 +90,9 @@ Mono> listNext( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -94,7 +100,11 @@ Mono> listNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String applicationGroupName) { + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -126,6 +136,9 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -145,6 +158,9 @@ private Mono> listSinglePageAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -153,7 +169,12 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String applicationGroupName, Context context) { + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -183,6 +204,9 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -201,15 +225,43 @@ private Mono> listSinglePageAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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 startMenuItemList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String applicationGroupName) { + private PagedFlux listAsync( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List start menu items in the given application group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application 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 startMenuItemList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String applicationGroupName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, applicationGroupName), + () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -218,6 +270,9 @@ public PagedFlux listAsync(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -226,9 +281,16 @@ public PagedFlux listAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String applicationGroupName, Context context) { + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, applicationGroupName, context), + () -> + listSinglePageAsync( + resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -244,7 +306,11 @@ private PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String applicationGroupName) { - return new PagedIterable<>(listAsync(resourceGroupName, applicationGroupName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip)); } /** @@ -252,6 +318,9 @@ public PagedIterable list(String resourceGroupName, String a * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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. @@ -260,14 +329,21 @@ public PagedIterable list(String resourceGroupName, String a */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String resourceGroupName, String applicationGroupName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, applicationGroupName, context)); + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context)); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -302,7 +378,8 @@ private Mono> listNextSinglePageAsync(String n /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemsImpl.java index d2e35c48f2c84..efd30a677bca6 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemsImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemsImpl.java @@ -31,9 +31,17 @@ public PagedIterable list(String resourceGroupName, String applic return Utils.mapPage(inner, inner1 -> new StartMenuItemImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String applicationGroupName, Context context) { + public PagedIterable list( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { PagedIterable inner = - this.serviceClient().list(resourceGroupName, applicationGroupName, context); + this + .serviceClient() + .list(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new StartMenuItemImpl(inner1, this.manager())); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionsClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionsClientImpl.java index 12fb21a25d7e0..25dada8ddc27e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionsClientImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionsClientImpl.java @@ -73,6 +73,9 @@ Mono> listByHostPool( @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, @QueryParam("$filter") String filter, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); @@ -127,6 +130,9 @@ Mono> list( @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, @PathParam("sessionHostName") String sessionHostname, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); @@ -194,6 +200,9 @@ Mono> listNext( * @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 filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. + * @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. @@ -201,7 +210,12 @@ Mono> listNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, String hostPoolName, String filter) { + String resourceGroupName, + String hostPoolName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -233,6 +247,9 @@ private Mono> listByHostPoolSinglePageAsync( resourceGroupName, hostPoolName, filter, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -253,6 +270,9 @@ private Mono> listByHostPoolSinglePageAsync( * @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 filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. + * @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. @@ -261,7 +281,13 @@ private Mono> listByHostPoolSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, String hostPoolName, String filter, Context context) { + String resourceGroupName, + String hostPoolName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -291,6 +317,9 @@ private Mono> listByHostPoolSinglePageAsync( resourceGroupName, hostPoolName, filter, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -310,16 +339,26 @@ private Mono> listByHostPoolSinglePageAsync( * @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 filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. + * @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 userSessionList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName, String filter) { + private PagedFlux listByHostPoolAsync( + String resourceGroupName, + String hostPoolName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, filter), + () -> + listByHostPoolSinglePageAsync( + resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip), nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); } @@ -334,10 +373,15 @@ public PagedFlux listByHostPoolAsync( * @return userSessionList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName) { + private PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName) { final String filter = null; + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, filter), + () -> + listByHostPoolSinglePageAsync( + resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip), nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); } @@ -347,6 +391,9 @@ public PagedFlux listByHostPoolAsync(String resourceGroupName, * @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 filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. + * @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. @@ -355,9 +402,17 @@ public PagedFlux listByHostPoolAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName, String filter, Context context) { + String resourceGroupName, + String hostPoolName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, filter, context), + () -> + listByHostPoolSinglePageAsync( + resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip, context), nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); } @@ -374,7 +429,11 @@ private PagedFlux listByHostPoolAsync( @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName) { final String filter = null; - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, hostPoolName, filter)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip)); } /** @@ -383,6 +442,9 @@ public PagedIterable listByHostPool(String resourceGroupName, * @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 filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. + * @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. @@ -391,8 +453,15 @@ public PagedIterable listByHostPool(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName, String filter, Context context) { - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, hostPoolName, filter, context)); + String resourceGroupName, + String hostPoolName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip, context)); } /** @@ -408,7 +477,7 @@ public PagedIterable listByHostPool( * @return a userSession along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { if (this.client.getEndpoint() == null) { return Mono @@ -524,7 +593,7 @@ private Mono> getWithResponseAsync( * @return a userSession on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( + private Mono getAsync( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -537,15 +606,16 @@ public Mono getAsync( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. + * @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 userSession. + * @return a userSession along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UserSessionInner get( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { - return getAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId).block(); + public Response getWithResponse( + String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { + return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, context).block(); } /** @@ -555,16 +625,16 @@ public UserSessionInner get( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. - * @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 userSession along with {@link Response}. + * @return a userSession. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { - return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, context).block(); + public UserSessionInner get( + String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + return getWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, Context.NONE) + .getValue(); } /** @@ -581,7 +651,7 @@ public Response getWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( + private Mono> deleteWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Boolean force) { if (this.client.getEndpoint() == null) { return Mono @@ -699,33 +769,13 @@ private Mono> deleteWithResponseAsync( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. - * @param force Force flag to login off userSession. * @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 hostPoolName, String sessionHostname, String userSessionId, Boolean force) { - return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Remove a userSession. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @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( + private Mono deleteAsync( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { final Boolean force = null; return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force) @@ -739,14 +789,23 @@ public Mono deleteAsync( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. + * @param force Force flag to login off userSession. + * @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 void delete(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { - final Boolean force = null; - deleteAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force).block(); + public Response deleteWithResponse( + String resourceGroupName, + String hostPoolName, + String sessionHostname, + String userSessionId, + Boolean force, + Context context) { + return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force, context) + .block(); } /** @@ -756,23 +815,14 @@ public void delete(String resourceGroupName, String hostPoolName, String session * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. - * @param force Force flag to login off userSession. - * @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 hostPoolName, - String sessionHostname, - String userSessionId, - Boolean force, - Context context) { - return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force, context) - .block(); + public void delete(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + final Boolean force = null; + deleteWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force, Context.NONE); } /** @@ -781,6 +831,9 @@ public Response deleteWithResponse( * @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 sessionHostname The name of the session host within the specified host pool. + * @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. @@ -788,7 +841,12 @@ public Response deleteWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String hostPoolName, String sessionHostname) { + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -824,6 +882,9 @@ private Mono> listSinglePageAsync( resourceGroupName, hostPoolName, sessionHostname, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -844,6 +905,9 @@ private Mono> listSinglePageAsync( * @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 sessionHostname The name of the session host within the specified host pool. + * @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. @@ -852,7 +916,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -886,6 +956,9 @@ private Mono> listSinglePageAsync( resourceGroupName, hostPoolName, sessionHostname, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -899,6 +972,35 @@ private Mono> listSinglePageAsync( null)); } + /** + * List userSessions. + * + * @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 sessionHostname The name of the session host within the specified host pool. + * @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 userSessionList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + /** * List userSessions. * @@ -911,10 +1013,15 @@ private Mono> listSinglePageAsync( * @return userSessionList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String hostPoolName, String sessionHostname) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, hostPoolName, sessionHostname), + () -> + listSinglePageAsync( + resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -924,6 +1031,9 @@ public PagedFlux listAsync( * @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 sessionHostname The name of the session host within the specified host pool. + * @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. @@ -932,9 +1042,17 @@ public PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, hostPoolName, sessionHostname, context), + () -> + listSinglePageAsync( + resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -951,7 +1069,11 @@ private PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String hostPoolName, String sessionHostname) { - return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName, sessionHostname)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listAsync(resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip)); } /** @@ -960,6 +1082,9 @@ public PagedIterable list(String resourceGroupName, String hos * @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 sessionHostname The name of the session host within the specified host pool. + * @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. @@ -968,8 +1093,15 @@ public PagedIterable list(String resourceGroupName, String hos */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName, sessionHostname, context)); + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip, context)); } /** @@ -985,7 +1117,7 @@ public PagedIterable list( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> disconnectWithResponseAsync( + private Mono> disconnectWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { if (this.client.getEndpoint() == null) { return Mono @@ -1101,7 +1233,7 @@ private Mono> disconnectWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono disconnectAsync( + private Mono disconnectAsync( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { return disconnectWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId) .flatMap(ignored -> Mono.empty()); @@ -1114,14 +1246,17 @@ public Mono disconnectAsync( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. + * @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 void disconnect( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { - disconnectAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId).block(); + public Response disconnectWithResponse( + String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { + return disconnectWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, context) + .block(); } /** @@ -1131,17 +1266,14 @@ public void disconnect( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. - * @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 disconnectWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { - return disconnectWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, context) - .block(); + public void disconnect( + String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + disconnectWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, Context.NONE); } /** @@ -1158,7 +1290,7 @@ public Response disconnectWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> sendMessageWithResponseAsync( + private Mono> sendMessageWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname, @@ -1286,19 +1418,15 @@ private Mono> sendMessageWithResponseAsync( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. - * @param sendMessage Object containing message includes title and message body. * @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 sendMessageAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - SendMessage sendMessage) { + private Mono sendMessageAsync( + String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + final SendMessage sendMessage = null; return sendMessageWithResponseAsync( resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage) .flatMap(ignored -> Mono.empty()); @@ -1311,18 +1439,24 @@ public Mono sendMessageAsync( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. + * @param sendMessage Object containing message includes title and message body. + * @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 {@link Mono} that completes when a successful response is received. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono sendMessageAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { - final SendMessage sendMessage = null; + public Response sendMessageWithResponse( + String resourceGroupName, + String hostPoolName, + String sessionHostname, + String userSessionId, + SendMessage sendMessage, + Context context) { return sendMessageWithResponseAsync( - resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage) - .flatMap(ignored -> Mono.empty()); + resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage, context) + .block(); } /** @@ -1340,40 +1474,15 @@ public Mono sendMessageAsync( public void sendMessage( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { final SendMessage sendMessage = null; - sendMessageAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage).block(); - } - - /** - * Send a message to a user. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @param sendMessage Object containing message includes title and message body. - * @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 sendMessageWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - SendMessage sendMessage, - Context context) { - return sendMessageWithResponseAsync( - resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage, context) - .block(); + sendMessageWithResponse( + resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage, Context.NONE); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1408,7 +1517,8 @@ private Mono> listByHostPoolNextSinglePageAsync( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1444,7 +1554,8 @@ private Mono> listByHostPoolNextSinglePageAsync( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1479,7 +1590,8 @@ private Mono> listNextSinglePageAsync(String nex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionsImpl.java index d42585135ed62..5630acfc56472 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionsImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionsImpl.java @@ -35,23 +35,20 @@ public PagedIterable listByHostPool(String resourceGroupName, Strin } public PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName, String filter, Context context) { + String resourceGroupName, + String hostPoolName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { PagedIterable inner = - this.serviceClient().listByHostPool(resourceGroupName, hostPoolName, filter, context); + this + .serviceClient() + .listByHostPool(resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new UserSessionImpl(inner1, this.manager())); } - public UserSession get( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { - UserSessionInner inner = - this.serviceClient().get(resourceGroupName, hostPoolName, sessionHostname, userSessionId); - if (inner != null) { - return new UserSessionImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { Response inner = @@ -69,8 +66,15 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { - this.serviceClient().delete(resourceGroupName, hostPoolName, sessionHostname, userSessionId); + public UserSession get( + String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + UserSessionInner inner = + this.serviceClient().get(resourceGroupName, hostPoolName, sessionHostname, userSessionId); + if (inner != null) { + return new UserSessionImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -85,6 +89,10 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force, context); } + public void delete(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + this.serviceClient().delete(resourceGroupName, hostPoolName, sessionHostname, userSessionId); + } + public PagedIterable list(String resourceGroupName, String hostPoolName, String sessionHostname) { PagedIterable inner = this.serviceClient().list(resourceGroupName, hostPoolName, sessionHostname); @@ -92,17 +100,20 @@ public PagedIterable list(String resourceGroupName, String hostPool } public PagedIterable list( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { PagedIterable inner = - this.serviceClient().list(resourceGroupName, hostPoolName, sessionHostname, context); + this + .serviceClient() + .list(resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new UserSessionImpl(inner1, this.manager())); } - public void disconnect( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { - this.serviceClient().disconnect(resourceGroupName, hostPoolName, sessionHostname, userSessionId); - } - public Response disconnectWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { return this @@ -110,9 +121,9 @@ public Response disconnectWithResponse( .disconnectWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, context); } - public void sendMessage( + public void disconnect( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { - this.serviceClient().sendMessage(resourceGroupName, hostPoolName, sessionHostname, userSessionId); + this.serviceClient().disconnect(resourceGroupName, hostPoolName, sessionHostname, userSessionId); } public Response sendMessageWithResponse( @@ -128,6 +139,11 @@ public Response sendMessageWithResponse( resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage, context); } + public void sendMessage( + String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + this.serviceClient().sendMessage(resourceGroupName, hostPoolName, sessionHostname, userSessionId); + } + private UserSessionsClient serviceClient() { return this.innerClient; } 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 b97f285a33993..40c3c915ac964 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,7 +8,6 @@ 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.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetSku; @@ -101,10 +100,6 @@ public Boolean cloudPcResource() { return this.innerModel().cloudPcResource(); } - public PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); - } - public Region region() { return Region.fromName(this.regionName()); } @@ -292,16 +287,6 @@ 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/implementation/WorkspacesClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspacesClientImpl.java index 910baada107b9..95f8d834b8186 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspacesClientImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspacesClientImpl.java @@ -134,6 +134,9 @@ Mono> listByResourceGroup( @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); @@ -180,7 +183,7 @@ Mono> listBySubscriptionNext( * @return a workspace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( + private Mono> getByResourceGroupWithResponseAsync( String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { return Mono @@ -274,7 +277,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @return a workspace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { + private Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -284,14 +287,16 @@ public Mono getByResourceGroupAsync(String resourceGroupName, St * * @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 a workspace. + * @return a workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { - return getByResourceGroupAsync(resourceGroupName, workspaceName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -299,16 +304,14 @@ public WorkspaceInner getByResourceGroup(String resourceGroupName, String worksp * * @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 a workspace along with {@link Response}. + * @return a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { + return getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** @@ -323,7 +326,7 @@ public Response getByResourceGroupWithResponse( * @return represents a Workspace definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, WorkspaceInner workspace) { if (this.client.getEndpoint() == null) { return Mono @@ -431,7 +434,7 @@ private Mono> createOrUpdateWithResponseAsync( * @return represents a Workspace definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String workspaceName, WorkspaceInner workspace) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, workspace) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -443,14 +446,16 @@ public Mono createOrUpdateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param workspace Object containing Workspace 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 Workspace definition. + * @return represents a Workspace definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner workspace) { - return createOrUpdateAsync(resourceGroupName, workspaceName, workspace).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, WorkspaceInner workspace, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, workspace, context).block(); } /** @@ -459,16 +464,14 @@ public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param workspace Object containing Workspace 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 Workspace definition along with {@link Response}. + * @return represents a Workspace definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, WorkspaceInner workspace, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, workspace, context).block(); + public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner workspace) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, workspace, Context.NONE).getValue(); } /** @@ -482,7 +485,7 @@ public Response createOrUpdateWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -575,7 +578,7 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String workspaceName) { + private Mono deleteAsync(String resourceGroupName, String workspaceName) { return deleteWithResponseAsync(resourceGroupName, workspaceName).flatMap(ignored -> Mono.empty()); } @@ -584,13 +587,15 @@ public Mono deleteAsync(String resourceGroupName, String workspaceName) { * * @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 the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName) { - deleteAsync(resourceGroupName, workspaceName).block(); + public Response deleteWithResponse(String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -598,15 +603,13 @@ public void delete(String resourceGroupName, String workspaceName) { * * @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 the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public void delete(String resourceGroupName, String workspaceName) { + deleteWithResponse(resourceGroupName, workspaceName, Context.NONE); } /** @@ -621,7 +624,7 @@ public Response deleteWithResponse(String resourceGroupName, String worksp * @return represents a Workspace definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String workspaceName, WorkspacePatch workspace) { if (this.client.getEndpoint() == null) { return Mono @@ -718,14 +721,14 @@ private Mono> updateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param workspace Object containing Workspace 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 Workspace definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String workspaceName, WorkspacePatch workspace) { + private Mono updateAsync(String resourceGroupName, String workspaceName) { + final WorkspacePatch workspace = null; return updateWithResponseAsync(resourceGroupName, workspaceName, workspace) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -735,16 +738,17 @@ public Mono updateAsync(String resourceGroupName, String workspa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param workspace Object containing Workspace 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 Workspace definition on successful completion of {@link Mono}. + * @return represents a Workspace definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String workspaceName) { - final WorkspacePatch workspace = null; - return updateWithResponseAsync(resourceGroupName, workspaceName, workspace) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, String workspaceName, WorkspacePatch workspace, Context context) { + return updateWithResponseAsync(resourceGroupName, workspaceName, workspace, context).block(); } /** @@ -760,38 +764,24 @@ public Mono updateAsync(String resourceGroupName, String workspa @ServiceMethod(returns = ReturnType.SINGLE) public WorkspaceInner update(String resourceGroupName, String workspaceName) { final WorkspacePatch workspace = null; - return updateAsync(resourceGroupName, workspaceName, workspace).block(); - } - - /** - * Update a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param workspace Object containing Workspace 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 Workspace definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String workspaceName, WorkspacePatch workspace, Context context) { - return updateWithResponseAsync(resourceGroupName, workspaceName, workspace, context).block(); + return updateWithResponse(resourceGroupName, workspaceName, workspace, Context.NONE).getValue(); } /** * List workspaces. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 workspaceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -818,6 +808,9 @@ private Mono> listByResourceGroupSinglePageAsync(S this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -836,6 +829,9 @@ private Mono> listByResourceGroupSinglePageAsync(S * List workspaces. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. @@ -844,7 +840,7 @@ private Mono> listByResourceGroupSinglePageAsync(S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -869,6 +865,9 @@ private Mono> listByResourceGroupSinglePageAsync( this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -882,6 +881,26 @@ private Mono> listByResourceGroupSinglePageAsync( null)); } + /** + * List workspaces. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 workspaceList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + /** * List workspaces. * @@ -892,9 +911,12 @@ private Mono> listByResourceGroupSinglePageAsync( * @return workspaceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } @@ -902,6 +924,9 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupNa * List workspaces. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. @@ -909,9 +934,10 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupNa * @return workspaceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } @@ -926,13 +952,19 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupN */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, pageSize, isDescending, initialSkip)); } /** * List workspaces. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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. @@ -940,8 +972,10 @@ public PagedIterable listByResourceGroup(String resourceGroupNam * @return workspaceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + public PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedIterable<>( + listByResourceGroupAsync(resourceGroupName, pageSize, isDescending, initialSkip, context)); } /** @@ -1039,7 +1073,7 @@ private Mono> listSinglePageAsync(Context context) * @return workspaceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { + private PagedFlux listAsync() { return new PagedFlux<>( () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } @@ -1088,7 +1122,8 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1124,7 +1159,8 @@ private Mono> listByResourceGroupNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1161,7 +1197,8 @@ private Mono> listByResourceGroupNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. @@ -1197,7 +1234,8 @@ private Mono> listBySubscriptionNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspacesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspacesImpl.java index 613684ca1a442..d7ef068f04b06 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspacesImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspacesImpl.java @@ -28,15 +28,6 @@ public WorkspacesImpl( this.serviceManager = serviceManager; } - public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { - WorkspaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, workspaceName); - if (inner != null) { - return new WorkspaceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String workspaceName, Context context) { Response inner = @@ -52,21 +43,33 @@ public Response getByResourceGroupWithResponse( } } - public void deleteByResourceGroup(String resourceGroupName, String workspaceName) { - this.serviceClient().delete(resourceGroupName, workspaceName); + public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { + WorkspaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, workspaceName); + if (inner != null) { + return new WorkspaceImpl(inner, this.manager()); + } else { + return null; + } } - public Response deleteWithResponse(String resourceGroupName, String workspaceName, Context context) { + public Response deleteByResourceGroupWithResponse( + String resourceGroupName, String workspaceName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, context); } + public void deleteByResourceGroup(String resourceGroupName, String workspaceName) { + this.serviceClient().delete(resourceGroupName, workspaceName); + } + public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + public PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } @@ -134,7 +137,7 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - this.deleteWithResponse(resourceGroupName, workspaceName, Context.NONE); + this.deleteByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { @@ -153,7 +156,7 @@ public Response deleteByIdWithResponse(String id, Context context) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - return this.deleteWithResponse(resourceGroupName, workspaceName, context); + return this.deleteByResourceGroupWithResponse(resourceGroupName, workspaceName, context); } private WorkspacesClient serviceClient() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AgentUpdatePatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AgentUpdatePatchProperties.java new file mode 100644 index 0000000000000..3f23da610e874 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AgentUpdatePatchProperties.java @@ -0,0 +1,139 @@ +// 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; +import java.util.List; + +/** The session host configuration for updating agent, monitoring agent, and stack component. */ +@Fluent +public final class AgentUpdatePatchProperties { + /* + * The type of maintenance for session host components. + */ + @JsonProperty(value = "type") + private SessionHostComponentUpdateType type; + + /* + * Whether to use localTime of the virtual machine. + */ + @JsonProperty(value = "useSessionHostLocalTime") + private Boolean useSessionHostLocalTime; + + /* + * Time zone for maintenance as defined in + * https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.findsystemtimezonebyid?view=net-5.0. Must be set + * if useLocalTime is true. + */ + @JsonProperty(value = "maintenanceWindowTimeZone") + private String maintenanceWindowTimeZone; + + /* + * List of maintenance windows. Maintenance windows are 2 hours long. + */ + @JsonProperty(value = "maintenanceWindows") + private List maintenanceWindows; + + /** Creates an instance of AgentUpdatePatchProperties class. */ + public AgentUpdatePatchProperties() { + } + + /** + * Get the type property: The type of maintenance for session host components. + * + * @return the type value. + */ + public SessionHostComponentUpdateType type() { + return this.type; + } + + /** + * Set the type property: The type of maintenance for session host components. + * + * @param type the type value to set. + * @return the AgentUpdatePatchProperties object itself. + */ + public AgentUpdatePatchProperties withType(SessionHostComponentUpdateType type) { + this.type = type; + return this; + } + + /** + * Get the useSessionHostLocalTime property: Whether to use localTime of the virtual machine. + * + * @return the useSessionHostLocalTime value. + */ + public Boolean useSessionHostLocalTime() { + return this.useSessionHostLocalTime; + } + + /** + * Set the useSessionHostLocalTime property: Whether to use localTime of the virtual machine. + * + * @param useSessionHostLocalTime the useSessionHostLocalTime value to set. + * @return the AgentUpdatePatchProperties object itself. + */ + public AgentUpdatePatchProperties withUseSessionHostLocalTime(Boolean useSessionHostLocalTime) { + this.useSessionHostLocalTime = useSessionHostLocalTime; + return this; + } + + /** + * Get the maintenanceWindowTimeZone property: Time zone for maintenance as defined in + * https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.findsystemtimezonebyid?view=net-5.0. Must be set + * if useLocalTime is true. + * + * @return the maintenanceWindowTimeZone value. + */ + public String maintenanceWindowTimeZone() { + return this.maintenanceWindowTimeZone; + } + + /** + * Set the maintenanceWindowTimeZone property: Time zone for maintenance as defined in + * https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.findsystemtimezonebyid?view=net-5.0. Must be set + * if useLocalTime is true. + * + * @param maintenanceWindowTimeZone the maintenanceWindowTimeZone value to set. + * @return the AgentUpdatePatchProperties object itself. + */ + public AgentUpdatePatchProperties withMaintenanceWindowTimeZone(String maintenanceWindowTimeZone) { + this.maintenanceWindowTimeZone = maintenanceWindowTimeZone; + return this; + } + + /** + * Get the maintenanceWindows property: List of maintenance windows. Maintenance windows are 2 hours long. + * + * @return the maintenanceWindows value. + */ + public List maintenanceWindows() { + return this.maintenanceWindows; + } + + /** + * Set the maintenanceWindows property: List of maintenance windows. Maintenance windows are 2 hours long. + * + * @param maintenanceWindows the maintenanceWindows value to set. + * @return the AgentUpdatePatchProperties object itself. + */ + public AgentUpdatePatchProperties withMaintenanceWindows( + List maintenanceWindows) { + this.maintenanceWindows = maintenanceWindows; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (maintenanceWindows() != null) { + maintenanceWindows().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AgentUpdateProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AgentUpdateProperties.java new file mode 100644 index 0000000000000..b82f435aa0e11 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AgentUpdateProperties.java @@ -0,0 +1,138 @@ +// 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; +import java.util.List; + +/** The session host configuration for updating agent, monitoring agent, and stack component. */ +@Fluent +public final class AgentUpdateProperties { + /* + * The type of maintenance for session host components. + */ + @JsonProperty(value = "type") + private SessionHostComponentUpdateType type; + + /* + * Whether to use localTime of the virtual machine. + */ + @JsonProperty(value = "useSessionHostLocalTime") + private Boolean useSessionHostLocalTime; + + /* + * Time zone for maintenance as defined in + * https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.findsystemtimezonebyid?view=net-5.0. Must be set + * if useLocalTime is true. + */ + @JsonProperty(value = "maintenanceWindowTimeZone") + private String maintenanceWindowTimeZone; + + /* + * List of maintenance windows. Maintenance windows are 2 hours long. + */ + @JsonProperty(value = "maintenanceWindows") + private List maintenanceWindows; + + /** Creates an instance of AgentUpdateProperties class. */ + public AgentUpdateProperties() { + } + + /** + * Get the type property: The type of maintenance for session host components. + * + * @return the type value. + */ + public SessionHostComponentUpdateType type() { + return this.type; + } + + /** + * Set the type property: The type of maintenance for session host components. + * + * @param type the type value to set. + * @return the AgentUpdateProperties object itself. + */ + public AgentUpdateProperties withType(SessionHostComponentUpdateType type) { + this.type = type; + return this; + } + + /** + * Get the useSessionHostLocalTime property: Whether to use localTime of the virtual machine. + * + * @return the useSessionHostLocalTime value. + */ + public Boolean useSessionHostLocalTime() { + return this.useSessionHostLocalTime; + } + + /** + * Set the useSessionHostLocalTime property: Whether to use localTime of the virtual machine. + * + * @param useSessionHostLocalTime the useSessionHostLocalTime value to set. + * @return the AgentUpdateProperties object itself. + */ + public AgentUpdateProperties withUseSessionHostLocalTime(Boolean useSessionHostLocalTime) { + this.useSessionHostLocalTime = useSessionHostLocalTime; + return this; + } + + /** + * Get the maintenanceWindowTimeZone property: Time zone for maintenance as defined in + * https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.findsystemtimezonebyid?view=net-5.0. Must be set + * if useLocalTime is true. + * + * @return the maintenanceWindowTimeZone value. + */ + public String maintenanceWindowTimeZone() { + return this.maintenanceWindowTimeZone; + } + + /** + * Set the maintenanceWindowTimeZone property: Time zone for maintenance as defined in + * https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.findsystemtimezonebyid?view=net-5.0. Must be set + * if useLocalTime is true. + * + * @param maintenanceWindowTimeZone the maintenanceWindowTimeZone value to set. + * @return the AgentUpdateProperties object itself. + */ + public AgentUpdateProperties withMaintenanceWindowTimeZone(String maintenanceWindowTimeZone) { + this.maintenanceWindowTimeZone = maintenanceWindowTimeZone; + return this; + } + + /** + * Get the maintenanceWindows property: List of maintenance windows. Maintenance windows are 2 hours long. + * + * @return the maintenanceWindows value. + */ + public List maintenanceWindows() { + return this.maintenanceWindows; + } + + /** + * Set the maintenanceWindows property: List of maintenance windows. Maintenance windows are 2 hours long. + * + * @param maintenanceWindows the maintenanceWindows value to set. + * @return the AgentUpdateProperties object itself. + */ + public AgentUpdateProperties withMaintenanceWindows(List maintenanceWindows) { + this.maintenanceWindows = maintenanceWindows; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (maintenanceWindows() != null) { + maintenanceWindows().forEach(e -> e.validate()); + } + } +} 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 a7234999167fc..a82821fda1012 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 @@ -145,13 +145,6 @@ public interface ApplicationGroup { */ ApplicationGroupType applicationGroupType(); - /** - * Gets the migrationRequest property: The registration info of HostPool. - * - * @return the migrationRequest value. - */ - MigrationRequestProperties migrationRequest(); - /** * Gets the cloudPcResource property: Is cloud pc resource. * @@ -261,8 +254,7 @@ interface WithCreate DefinitionStages.WithSku, DefinitionStages.WithPlan, DefinitionStages.WithDescription, - DefinitionStages.WithFriendlyName, - DefinitionStages.WithMigrationRequest { + DefinitionStages.WithFriendlyName { /** * Executes the create request. * @@ -367,16 +359,6 @@ interface WithFriendlyName { */ WithCreate withFriendlyName(String friendlyName); } - /** The stage of the ApplicationGroup definition allowing to specify migrationRequest. */ - interface WithMigrationRequest { - /** - * Specifies the migrationRequest property: The registration info of HostPool.. - * - * @param migrationRequest The registration info of HostPool. - * @return the next definition stage. - */ - WithCreate withMigrationRequest(MigrationRequestProperties migrationRequest); - } } /** * Begins update for the ApplicationGroup resource. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupList.java index fbd8aba315f1c..6c2e29d502aae 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupList.java @@ -9,7 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** ApplicationGroupList List of ApplicationGroup definitions. */ +/** + * ApplicationGroupList + * + *

List of ApplicationGroup definitions. + */ @Fluent public final class ApplicationGroupList { /* @@ -24,6 +28,10 @@ public final class ApplicationGroupList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ApplicationGroupList class. */ + public ApplicationGroupList() { + } + /** * Get the value property: List of ApplicationGroup definitions. * 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 bb3f17a9045b1..61e0c0ad0f321 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 @@ -27,6 +27,10 @@ public final class ApplicationGroupPatch extends ProxyResource { @JsonProperty(value = "properties") private ApplicationGroupPatchProperties innerProperties; + /** Creates an instance of ApplicationGroupPatch class. */ + public ApplicationGroupPatch() { + } + /** * Get the tags property: tags to be updated. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupType.java index 01b80cf202b7a..a1d618e71c449 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ApplicationGroupType. */ +/** Resource Type of ApplicationGroup. */ public final class ApplicationGroupType extends ExpandableStringEnum { /** Static value RemoteApp for ApplicationGroupType. */ public static final ApplicationGroupType REMOTE_APP = fromString("RemoteApp"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroups.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroups.java index 33ee144da156f..d4b001edc24db 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroups.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroups.java @@ -15,50 +15,51 @@ public interface ApplicationGroups { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @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 an application group. + * @return an application group along with {@link Response}. */ - ApplicationGroup getByResourceGroup(String resourceGroupName, String applicationGroupName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String applicationGroupName, Context context); /** * Get an application group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. - * @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 an application group along with {@link Response}. + * @return an application group. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String applicationGroupName, Context context); + ApplicationGroup getByResourceGroup(String resourceGroupName, String applicationGroupName); /** * Remove an applicationGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @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}. */ - void deleteByResourceGroup(String resourceGroupName, String applicationGroupName); + Response deleteByResourceGroupWithResponse( + String resourceGroupName, String applicationGroupName, Context context); /** * Remove an applicationGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. - * @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 applicationGroupName, Context context); + void deleteByResourceGroup(String resourceGroupName, String applicationGroupName); /** * List applicationGroups. @@ -76,13 +77,22 @@ Response getByResourceGroupWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. + * @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 applicationGroupList as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context); + PagedIterable listByResourceGroup( + String resourceGroupName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * List applicationGroups in subscription. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationList.java index f1215bbd1f448..8b1f4ababfb24 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationList.java @@ -9,7 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** ApplicationList List of Application definitions. */ +/** + * ApplicationList + * + *

List of Application definitions. + */ @Fluent public final class ApplicationList { /* @@ -24,6 +28,10 @@ public final class ApplicationList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ApplicationList class. */ + public ApplicationList() { + } + /** * Get the value property: List of Application definitions. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationPatch.java index 3a17fb67da945..ffb452e260b5a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationPatch.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationPatch.java @@ -26,6 +26,10 @@ public final class ApplicationPatch { @JsonProperty(value = "properties") private ApplicationPatchProperties innerProperties; + /** Creates an instance of ApplicationPatch class. */ + public ApplicationPatch() { + } + /** * Get the tags property: tags to be updated. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationType.java index ca1f830818a09..263396caee754 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ApplicationType. */ +/** Application type of application. */ public final class ApplicationType extends ExpandableStringEnum { /** Static value RemoteApp for ApplicationType. */ public static final ApplicationType REMOTE_APP = fromString("RemoteApp"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Applications.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Applications.java index e1e5a9323400b..e8576ae8e0e9b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Applications.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Applications.java @@ -16,12 +16,14 @@ public interface Applications { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. + * @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 an application. + * @return an application along with {@link Response}. */ - Application get(String resourceGroupName, String applicationGroupName, String applicationName); + Response getWithResponse( + String resourceGroupName, String applicationGroupName, String applicationName, Context context); /** * Get an application. @@ -29,14 +31,12 @@ public interface Applications { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. - * @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 an application along with {@link Response}. + * @return an application. */ - Response getWithResponse( - String resourceGroupName, String applicationGroupName, String applicationName, Context context); + Application get(String resourceGroupName, String applicationGroupName, String applicationName); /** * Remove an application. @@ -44,11 +44,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. + * @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}. */ - void delete(String resourceGroupName, String applicationGroupName, String applicationName); + Response deleteWithResponse( + String resourceGroupName, String applicationGroupName, String applicationName, Context context); /** * Remove an application. @@ -56,14 +59,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. - * @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 applicationGroupName, String applicationName, Context context); + void delete(String resourceGroupName, String applicationGroupName, String applicationName); /** * List applications. @@ -82,13 +82,22 @@ Response deleteWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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 applicationList as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String applicationGroupName, Context context); + PagedIterable list( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * Get an application. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/CommandLineSetting.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/CommandLineSetting.java index 35b7c61aeff22..d4a7188379e73 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/CommandLineSetting.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/CommandLineSetting.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for CommandLineSetting. */ +/** + * Specifies whether this published application can be launched with command line arguments provided by the client, + * command line arguments specified at publish time, or no command line arguments at all. + */ public final class CommandLineSetting extends ExpandableStringEnum { /** Static value DoNotAllow for CommandLineSetting. */ public static final CommandLineSetting DO_NOT_ALLOW = fromString("DoNotAllow"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DayOfWeek.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DayOfWeek.java new file mode 100644 index 0000000000000..e7a4324672a1f --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DayOfWeek.java @@ -0,0 +1,66 @@ +// 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.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Day of the week. */ +public enum DayOfWeek { + /** Enum value Monday. */ + MONDAY("Monday"), + + /** Enum value Tuesday. */ + TUESDAY("Tuesday"), + + /** Enum value Wednesday. */ + WEDNESDAY("Wednesday"), + + /** Enum value Thursday. */ + THURSDAY("Thursday"), + + /** Enum value Friday. */ + FRIDAY("Friday"), + + /** Enum value Saturday. */ + SATURDAY("Saturday"), + + /** Enum value Sunday. */ + SUNDAY("Sunday"); + + /** The actual serialized value for a DayOfWeek instance. */ + private final String value; + + DayOfWeek(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DayOfWeek instance. + * + * @param value the serialized value to parse. + * @return the parsed DayOfWeek object, or null if unable to parse. + */ + @JsonCreator + public static DayOfWeek fromString(String value) { + if (value == null) { + return null; + } + DayOfWeek[] items = DayOfWeek.values(); + for (DayOfWeek item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** {@inheritDoc} */ + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopList.java index db5b33efe4f31..ba3adad3bccda 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopList.java @@ -9,7 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** DesktopList List of Desktop definitions. */ +/** + * DesktopList + * + *

List of Desktop definitions. + */ @Fluent public final class DesktopList { /* @@ -24,6 +28,10 @@ public final class DesktopList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of DesktopList class. */ + public DesktopList() { + } + /** * Get the value property: List of Desktop definitions. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopPatch.java index 79720a92f7d4b..6ff80cdfed029 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopPatch.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopPatch.java @@ -26,6 +26,10 @@ public final class DesktopPatch { @JsonProperty(value = "properties") private DesktopPatchProperties innerProperties; + /** Creates an instance of DesktopPatch class. */ + public DesktopPatch() { + } + /** * Get the tags property: tags to be updated. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Desktops.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Desktops.java index d681456214c75..80e3c1c177a40 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Desktops.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Desktops.java @@ -10,19 +10,6 @@ /** Resource collection API of Desktops. */ public interface Desktops { - /** - * Get a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop 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 desktop. - */ - Desktop get(String resourceGroupName, String applicationGroupName, String desktopName); - /** * Get a desktop. * @@ -39,7 +26,7 @@ Response getWithResponse( String resourceGroupName, String applicationGroupName, String desktopName, Context context); /** - * Update a desktop. + * Get a desktop. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. @@ -47,9 +34,9 @@ Response getWithResponse( * @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 schema for Desktop properties. + * @return a desktop. */ - Desktop update(String resourceGroupName, String applicationGroupName, String desktopName); + Desktop get(String resourceGroupName, String applicationGroupName, String desktopName); /** * Update a desktop. @@ -71,6 +58,19 @@ Response updateWithResponse( DesktopPatch desktop, Context context); + /** + * Update a desktop. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group. + * @param desktopName The name of the desktop within the specified desktop 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 schema for Desktop properties. + */ + Desktop update(String resourceGroupName, String applicationGroupName, String desktopName); + /** * List desktops. * @@ -88,11 +88,20 @@ Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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 desktopList as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String applicationGroupName, Context context); + PagedIterable list( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ExpandMsixImageList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ExpandMsixImageList.java index 1338f404b0543..178c8b8ad58a7 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ExpandMsixImageList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ExpandMsixImageList.java @@ -9,7 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** ExpandMsixImageList List of MSIX package properties retrieved from MSIX Image expansion. */ +/** + * ExpandMsixImageList + * + *

List of MSIX package properties retrieved from MSIX Image expansion. + */ @Fluent public final class ExpandMsixImageList { /* @@ -24,6 +28,10 @@ public final class ExpandMsixImageList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ExpandMsixImageList class. */ + public ExpandMsixImageList() { + } + /** * Get the value property: List of MSIX package properties from give MSIX Image. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HealthCheckName.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HealthCheckName.java index 2105588d953f8..595adcb779550 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HealthCheckName.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HealthCheckName.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for HealthCheckName. */ +/** Represents the name of the health check operation performed. */ public final class HealthCheckName extends ExpandableStringEnum { /** Static value DomainJoinedCheck for HealthCheckName. */ public static final HealthCheckName DOMAIN_JOINED_CHECK = fromString("DomainJoinedCheck"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HealthCheckResult.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HealthCheckResult.java index 6ce4002a1c276..e92669104bce1 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HealthCheckResult.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HealthCheckResult.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for HealthCheckResult. */ +/** Represents the Health state of the health check we performed. */ public final class HealthCheckResult extends ExpandableStringEnum { /** Static value Unknown for HealthCheckResult. */ public static final HealthCheckResult UNKNOWN = fromString("Unknown"); 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 16155e74e693a..01c3b5324d2d9 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 @@ -241,13 +241,6 @@ public interface HostPool { */ Boolean startVMOnConnect(); - /** - * Gets the migrationRequest property: The registration info of HostPool. - * - * @return the migrationRequest value. - */ - MigrationRequestProperties migrationRequest(); - /** * Gets the cloudPcResource property: Is cloud pc resource. * @@ -256,12 +249,12 @@ 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. + * Gets the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. * - * @return the publicNetworkAccess value. + * @return the agentUpdate value. */ - PublicNetworkAccess publicNetworkAccess(); + AgentUpdateProperties agentUpdate(); /** * Gets the region of the resource. @@ -391,8 +384,7 @@ interface WithCreate DefinitionStages.WithSsoClientSecretKeyVaultPath, DefinitionStages.WithSsoSecretType, DefinitionStages.WithStartVMOnConnect, - DefinitionStages.WithMigrationRequest, - DefinitionStages.WithPublicNetworkAccess { + DefinitionStages.WithAgentUpdate { /** * Executes the create request. * @@ -620,27 +612,17 @@ interface WithStartVMOnConnect { */ WithCreate withStartVMOnConnect(Boolean startVMOnConnect); } - /** The stage of the HostPool definition allowing to specify migrationRequest. */ - interface WithMigrationRequest { + /** The stage of the HostPool definition allowing to specify agentUpdate. */ + interface WithAgentUpdate { /** - * Specifies the migrationRequest property: The registration info of HostPool.. + * Specifies the agentUpdate property: The session host configuration for updating agent, monitoring agent, + * and stack component.. * - * @param migrationRequest The registration info of HostPool. + * @param agentUpdate The session host configuration for updating agent, monitoring agent, and stack + * component. * @return the next definition stage. */ - WithCreate withMigrationRequest(MigrationRequestProperties migrationRequest); - } - /** 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(PublicNetworkAccess publicNetworkAccess); + WithCreate withAgentUpdate(AgentUpdateProperties agentUpdate); } } /** @@ -669,7 +651,7 @@ interface Update UpdateStages.WithSsoSecretType, UpdateStages.WithPreferredAppGroupType, UpdateStages.WithStartVMOnConnect, - UpdateStages.WithPublicNetworkAccess { + UpdateStages.WithAgentUpdate { /** * Executes the update request. * @@ -862,16 +844,17 @@ interface WithStartVMOnConnect { */ Update withStartVMOnConnect(Boolean startVMOnConnect); } - /** The stage of the HostPool update allowing to specify publicNetworkAccess. */ - interface WithPublicNetworkAccess { + /** The stage of the HostPool update allowing to specify agentUpdate. */ + interface WithAgentUpdate { /** - * Specifies the publicNetworkAccess property: Enabled to allow this resource to be access from the public - * network. + * Specifies the agentUpdate property: The session host configuration for updating agent, monitoring agent, + * and stack component.. * - * @param publicNetworkAccess Enabled to allow this resource to be access from the public network. + * @param agentUpdate The session host configuration for updating agent, monitoring agent, and stack + * component. * @return the next definition stage. */ - Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + Update withAgentUpdate(AgentUpdatePatchProperties agentUpdate); } } /** @@ -892,20 +875,20 @@ interface WithPublicNetworkAccess { /** * Registration token of the host pool. * + * @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 RegistrationInfo definition. + * @return represents a RegistrationInfo definition along with {@link Response}. */ - RegistrationInfo retrieveRegistrationToken(); + Response retrieveRegistrationTokenWithResponse(Context context); /** * Registration token of the host pool. * - * @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 RegistrationInfo definition along with {@link Response}. + * @return represents a RegistrationInfo definition. */ - Response retrieveRegistrationTokenWithResponse(Context context); + RegistrationInfo retrieveRegistrationToken(); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolList.java index 0d08faccf23a6..bd83fe63e797d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolList.java @@ -9,7 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** HostPoolList List of HostPool definitions. */ +/** + * HostPoolList + * + *

List of HostPool definitions. + */ @Fluent public final class HostPoolList { /* @@ -24,6 +28,10 @@ public final class HostPoolList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of HostPoolList class. */ + public HostPoolList() { + } + /** * Get the value property: List of HostPool definitions. * 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 25303e17b0231..275d159a93026 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 @@ -27,6 +27,10 @@ public final class HostPoolPatch extends ProxyResource { @JsonProperty(value = "properties") private HostPoolPatchProperties innerProperties; + /** Creates an instance of HostPoolPatch class. */ + public HostPoolPatch() { + } + /** * Get the tags property: tags to be updated. * @@ -430,25 +434,27 @@ public HostPoolPatch withStartVMOnConnect(Boolean startVMOnConnect) { } /** - * Get the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. + * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. * - * @return the publicNetworkAccess value. + * @return the agentUpdate value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + public AgentUpdatePatchProperties agentUpdate() { + return this.innerProperties() == null ? null : this.innerProperties().agentUpdate(); } /** - * Set the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. + * Set the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. * - * @param publicNetworkAccess the publicNetworkAccess value to set. + * @param agentUpdate the agentUpdate value to set. * @return the HostPoolPatch object itself. */ - public HostPoolPatch withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + public HostPoolPatch withAgentUpdate(AgentUpdatePatchProperties agentUpdate) { if (this.innerProperties() == null) { this.innerProperties = new HostPoolPatchProperties(); } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + this.innerProperties().withAgentUpdate(agentUpdate); return this; } 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 5e666c99fa3f1..64e474a781726 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 @@ -144,13 +144,6 @@ public interface HostPoolProperties { */ Boolean startVMOnConnect(); - /** - * Gets the migrationRequest property: The registration info of HostPool. - * - * @return the migrationRequest value. - */ - MigrationRequestProperties migrationRequest(); - /** * Gets the cloudPcResource property: Is cloud pc resource. * @@ -159,12 +152,12 @@ 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. + * Gets the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. * - * @return the publicNetworkAccess value. + * @return the agentUpdate value. */ - PublicNetworkAccess publicNetworkAccess(); + AgentUpdateProperties agentUpdate(); /** * 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/HostPoolType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolType.java index 1c7d5b4b874a2..e3cdb96da854f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for HostPoolType. */ +/** HostPool type for desktop. */ public final class HostPoolType extends ExpandableStringEnum { /** Static value Personal for HostPoolType. */ public static final HostPoolType PERSONAL = fromString("Personal"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPools.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPools.java index a93ff1737413d..71be49d892fa3 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPools.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPools.java @@ -15,50 +15,50 @@ public interface HostPools { * * @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 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 host pool. + * @return a host pool along with {@link Response}. */ - HostPool getByResourceGroup(String resourceGroupName, String hostPoolName); + Response getByResourceGroupWithResponse(String resourceGroupName, String hostPoolName, Context context); /** * Get a host pool. * * @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 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 host pool along with {@link Response}. + * @return a host pool. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String hostPoolName, Context context); + HostPool getByResourceGroup(String resourceGroupName, String hostPoolName); /** * Remove a host pool. * * @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 force Force flag to delete sessionHost. + * @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}. */ - void delete(String resourceGroupName, String hostPoolName); + Response deleteWithResponse(String resourceGroupName, String hostPoolName, Boolean force, Context context); /** * Remove a host pool. * * @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 force Force flag to delete sessionHost. - * @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 hostPoolName, Boolean force, Context context); + void delete(String resourceGroupName, String hostPoolName); /** * List hostPools. @@ -75,13 +75,17 @@ public interface HostPools { * List hostPools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 hostPoolList as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * List hostPools in subscription. @@ -95,39 +99,42 @@ public interface HostPools { /** * List hostPools in subscription. * + * @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 hostPoolList as paginated response with {@link PagedIterable}. */ - PagedIterable list(Context context); + PagedIterable list(Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * Registration token of the host pool. * * @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 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 RegistrationInfo definition. + * @return represents a RegistrationInfo definition along with {@link Response}. */ - RegistrationInfo retrieveRegistrationToken(String resourceGroupName, String hostPoolName); + Response retrieveRegistrationTokenWithResponse( + String resourceGroupName, String hostPoolName, Context context); /** * Registration token of the host pool. * * @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 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 RegistrationInfo definition along with {@link Response}. + * @return represents a RegistrationInfo definition. */ - Response retrieveRegistrationTokenWithResponse( - String resourceGroupName, String hostPoolName, Context context); + RegistrationInfo retrieveRegistrationToken(String resourceGroupName, String hostPoolName); /** * Get a host pool. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Identity.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Identity.java index a293bfd01f68c..d78b5907e0d89 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Identity.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Identity.java @@ -28,6 +28,10 @@ public class Identity { @JsonProperty(value = "type") private ResourceIdentityType type; + /** Creates an instance of Identity class. */ + public Identity() { + } + /** * Get the principalId property: The principal ID of resource identity. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LoadBalancerType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LoadBalancerType.java index fcdffd98c88f0..32205544065da 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LoadBalancerType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LoadBalancerType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for LoadBalancerType. */ +/** The type of the load balancer. */ public final class LoadBalancerType extends ExpandableStringEnum { /** Static value BreadthFirst for LoadBalancerType. */ public static final LoadBalancerType BREADTH_FIRST = fromString("BreadthFirst"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LogSpecification.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LogSpecification.java index 3d34e2c482561..f431828f285da 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LogSpecification.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LogSpecification.java @@ -28,6 +28,10 @@ public final class LogSpecification { @JsonProperty(value = "blobDuration") private String blobDuration; + /** Creates an instance of LogSpecification class. */ + public LogSpecification() { + } + /** * Get the name property: Name of the log. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MaintenanceWindowPatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MaintenanceWindowPatchProperties.java new file mode 100644 index 0000000000000..b2fe15817df3a --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MaintenanceWindowPatchProperties.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Maintenance window starting hour and day of week. */ +@Fluent +public final class MaintenanceWindowPatchProperties { + /* + * The update start hour of the day. (0 - 23) + */ + @JsonProperty(value = "hour") + private Integer hour; + + /* + * Day of the week. + */ + @JsonProperty(value = "dayOfWeek") + private DayOfWeek dayOfWeek; + + /** Creates an instance of MaintenanceWindowPatchProperties class. */ + public MaintenanceWindowPatchProperties() { + } + + /** + * Get the hour property: The update start hour of the day. (0 - 23). + * + * @return the hour value. + */ + public Integer hour() { + return this.hour; + } + + /** + * Set the hour property: The update start hour of the day. (0 - 23). + * + * @param hour the hour value to set. + * @return the MaintenanceWindowPatchProperties object itself. + */ + public MaintenanceWindowPatchProperties withHour(Integer hour) { + this.hour = hour; + return this; + } + + /** + * Get the dayOfWeek property: Day of the week. + * + * @return the dayOfWeek value. + */ + public DayOfWeek dayOfWeek() { + return this.dayOfWeek; + } + + /** + * Set the dayOfWeek property: Day of the week. + * + * @param dayOfWeek the dayOfWeek value to set. + * @return the MaintenanceWindowPatchProperties object itself. + */ + public MaintenanceWindowPatchProperties withDayOfWeek(DayOfWeek dayOfWeek) { + this.dayOfWeek = dayOfWeek; + 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/MaintenanceWindowProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MaintenanceWindowProperties.java new file mode 100644 index 0000000000000..6b9223fe4dabe --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MaintenanceWindowProperties.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Maintenance window starting hour and day of week. */ +@Fluent +public final class MaintenanceWindowProperties { + /* + * The update start hour of the day. (0 - 23) + */ + @JsonProperty(value = "hour") + private Integer hour; + + /* + * Day of the week. + */ + @JsonProperty(value = "dayOfWeek") + private DayOfWeek dayOfWeek; + + /** Creates an instance of MaintenanceWindowProperties class. */ + public MaintenanceWindowProperties() { + } + + /** + * Get the hour property: The update start hour of the day. (0 - 23). + * + * @return the hour value. + */ + public Integer hour() { + return this.hour; + } + + /** + * Set the hour property: The update start hour of the day. (0 - 23). + * + * @param hour the hour value to set. + * @return the MaintenanceWindowProperties object itself. + */ + public MaintenanceWindowProperties withHour(Integer hour) { + this.hour = hour; + return this; + } + + /** + * Get the dayOfWeek property: Day of the week. + * + * @return the dayOfWeek value. + */ + public DayOfWeek dayOfWeek() { + return this.dayOfWeek; + } + + /** + * Set the dayOfWeek property: Day of the week. + * + * @param dayOfWeek the dayOfWeek value to set. + * @return the MaintenanceWindowProperties object itself. + */ + public MaintenanceWindowProperties withDayOfWeek(DayOfWeek dayOfWeek) { + this.dayOfWeek = dayOfWeek; + 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/MigrationRequestProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MigrationRequestProperties.java deleted file mode 100644 index 247d6ad36767f..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MigrationRequestProperties.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties for arm migration. */ -@Fluent -public final class MigrationRequestProperties { - /* - * The type of operation for migration. - */ - @JsonProperty(value = "operation") - private Operation operation; - - /* - * The path to the legacy object to migrate. - */ - @JsonProperty(value = "migrationPath") - private String migrationPath; - - /** - * Get the operation property: The type of operation for migration. - * - * @return the operation value. - */ - public Operation operation() { - return this.operation; - } - - /** - * Set the operation property: The type of operation for migration. - * - * @param operation the operation value to set. - * @return the MigrationRequestProperties object itself. - */ - public MigrationRequestProperties withOperation(Operation operation) { - this.operation = operation; - return this; - } - - /** - * Get the migrationPath property: The path to the legacy object to migrate. - * - * @return the migrationPath value. - */ - public String migrationPath() { - return this.migrationPath; - } - - /** - * Set the migrationPath property: The path to the legacy object to migrate. - * - * @param migrationPath the migrationPath value to set. - * @return the MigrationRequestProperties object itself. - */ - public MigrationRequestProperties withMigrationPath(String migrationPath) { - this.migrationPath = migrationPath; - 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/MsixImageUri.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixImageUri.java index a889f77772a2b..bc38ad3b1f9c5 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixImageUri.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixImageUri.java @@ -16,6 +16,10 @@ public final class MsixImageUri { @JsonProperty(value = "uri") private String uri; + /** Creates an instance of MsixImageUri class. */ + public MsixImageUri() { + } + /** * Get the uri property: URI to Image. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageApplications.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageApplications.java index bea9c81578d93..fd29936acefeb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageApplications.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageApplications.java @@ -24,8 +24,7 @@ public final class MsixPackageApplications { private String description; /* - * Used to activate Package Application. Consists of Package Name and - * ApplicationID. Found in appxmanifest.xml. + * Used to activate Package Application. Consists of Package Name and ApplicationID. Found in appxmanifest.xml. */ @JsonProperty(value = "appUserModelID") private String appUserModelId; @@ -54,6 +53,10 @@ public final class MsixPackageApplications { @JsonProperty(value = "rawPng") private byte[] rawPng; + /** Creates an instance of MsixPackageApplications class. */ + public MsixPackageApplications() { + } + /** * Get the appId property: Package Application Id, found in appxmanifest.xml. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageDependencies.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageDependencies.java index 9f712981f7d80..8947f39326016 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageDependencies.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageDependencies.java @@ -28,6 +28,10 @@ public final class MsixPackageDependencies { @JsonProperty(value = "minVersion") private String minVersion; + /** Creates an instance of MsixPackageDependencies class. */ + public MsixPackageDependencies() { + } + /** * Get the dependencyName property: Name of package dependency. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageList.java index ba85ce08091b3..8cb5af5ada0e6 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageList.java @@ -9,7 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** MsixPackageList List of MSIX Package definitions. */ +/** + * MsixPackageList + * + *

List of MSIX Package definitions. + */ @Fluent public final class MsixPackageList { /* @@ -24,6 +28,10 @@ public final class MsixPackageList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of MsixPackageList class. */ + public MsixPackageList() { + } + /** * Get the value property: List of MSIX Package definitions. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackagePatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackagePatch.java index dd34830025719..46862b3d1d564 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackagePatch.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackagePatch.java @@ -18,6 +18,10 @@ public final class MsixPackagePatch extends ProxyResource { @JsonProperty(value = "properties") private MsixPackagePatchProperties innerProperties; + /** Creates an instance of MsixPackagePatch class. */ + public MsixPackagePatch() { + } + /** * Get the innerProperties property: Detailed properties for MSIX Package. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackages.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackages.java index e7ad18a36b3aa..e06a6c9224855 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackages.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackages.java @@ -16,12 +16,14 @@ public interface MsixPackages { * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. + * @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 msixpackage. + * @return a msixpackage along with {@link Response}. */ - MsixPackage get(String resourceGroupName, String hostPoolName, String msixPackageFullName); + Response getWithResponse( + String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context); /** * Get a msixpackage. @@ -29,14 +31,12 @@ public interface MsixPackages { * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @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 msixpackage along with {@link Response}. + * @return a msixpackage. */ - Response getWithResponse( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context); + MsixPackage get(String resourceGroupName, String hostPoolName, String msixPackageFullName); /** * Remove an MSIX Package. @@ -44,11 +44,14 @@ Response getWithResponse( * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. + * @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}. */ - void delete(String resourceGroupName, String hostPoolName, String msixPackageFullName); + Response deleteWithResponse( + String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context); /** * Remove an MSIX Package. @@ -56,14 +59,11 @@ Response getWithResponse( * @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 msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @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 hostPoolName, String msixPackageFullName, Context context); + void delete(String resourceGroupName, String hostPoolName, String msixPackageFullName); /** * List MSIX packages in hostpool. @@ -82,13 +82,22 @@ Response deleteWithResponse( * * @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 msixPackageList as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String hostPoolName, Context context); + PagedIterable list( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * Get a msixpackage. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Operation.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Operation.java deleted file mode 100644 index 4b5dac16ac045..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Operation.java +++ /dev/null @@ -1,47 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Operation. */ -public final class Operation extends ExpandableStringEnum { - /** Static value Start for Operation. */ - public static final Operation START = fromString("Start"); - - /** Static value Revoke for Operation. */ - public static final Operation REVOKE = fromString("Revoke"); - - /** Static value Complete for Operation. */ - public static final Operation COMPLETE = fromString("Complete"); - - /** Static value Hide for Operation. */ - public static final Operation HIDE = fromString("Hide"); - - /** Static value Unhide for Operation. */ - public static final Operation UNHIDE = fromString("Unhide"); - - /** - * Creates or finds a Operation from its string representation. - * - * @param name a name to look for. - * @return the corresponding Operation. - */ - @JsonCreator - public static Operation fromString(String name) { - return fromString(name, Operation.class); - } - - /** - * Gets known Operation values. - * - * @return known Operation values. - */ - public static Collection values() { - return values(Operation.class); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/OperationProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/OperationProperties.java index 7938c4508fdee..d7fa4eab2a5f5 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/OperationProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/OperationProperties.java @@ -16,6 +16,10 @@ public final class OperationProperties { @JsonProperty(value = "serviceSpecification") private ServiceSpecification serviceSpecification; + /** Creates an instance of OperationProperties class. */ + public OperationProperties() { + } + /** * Get the serviceSpecification property: Service specification payload. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PersonalDesktopAssignmentType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PersonalDesktopAssignmentType.java index 24b0f6242882d..af15d2357baf3 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PersonalDesktopAssignmentType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PersonalDesktopAssignmentType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PersonalDesktopAssignmentType. */ +/** PersonalDesktopAssignment type for HostPool. */ public final class PersonalDesktopAssignmentType extends ExpandableStringEnum { /** Static value Automatic for PersonalDesktopAssignmentType. */ public static final PersonalDesktopAssignmentType AUTOMATIC = fromString("Automatic"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Plan.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Plan.java index d0304c2fcba75..8de430f2313ca 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Plan.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Plan.java @@ -18,23 +18,20 @@ public class Plan { private String name; /* - * The publisher of the 3rd Party Artifact that is being bought. E.g. - * NewRelic + * The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic */ @JsonProperty(value = "publisher", required = true) private String publisher; /* - * The 3rd Party artifact that is being procured. E.g. NewRelic. Product - * maps to the OfferID specified for the artifact at the time of Data - * Market onboarding. + * The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the + * artifact at the time of Data Market onboarding. */ @JsonProperty(value = "product", required = true) private String product; /* - * A publisher provided promotion code as provisioned in Data Market for - * the said product/artifact. + * A publisher provided promotion code as provisioned in Data Market for the said product/artifact. */ @JsonProperty(value = "promotionCode") private String promotionCode; @@ -45,6 +42,10 @@ public class Plan { @JsonProperty(value = "version") private String version; + /** Creates an instance of Plan class. */ + public Plan() { + } + /** * Get the name property: A user defined name of the 3rd Party Artifact that is being procured. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PreferredAppGroupType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PreferredAppGroupType.java index 1e30ad981d1cd..acff713aa4626 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PreferredAppGroupType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PreferredAppGroupType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PreferredAppGroupType. */ +/** The type of preferred application group type, default to Desktop Application Group. */ public final class PreferredAppGroupType extends ExpandableStringEnum { /** Static value None for PreferredAppGroupType. */ public static final PreferredAppGroupType NONE = fromString("None"); 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 deleted file mode 100644 index d5deb10336525..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpoint.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.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; - - /** - * 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 deleted file mode 100644 index 0b143f836245b..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnection.java +++ /dev/null @@ -1,113 +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.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; - - /** - * 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(); - } - - /** - * Set the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @param provisioningState the provisioningState value to set. - * @return the PrivateEndpointConnection object itself. - */ - public PrivateEndpointConnection withProvisioningState( - PrivateEndpointConnectionProvisioningState provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); - 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/PrivateEndpointConnectionListResultWithSystemData.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionListResultWithSystemData.java deleted file mode 100644 index 64111d04b8c92..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionListResultWithSystemData.java +++ /dev/null @@ -1,67 +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.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; - - /** - * 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 deleted file mode 100644 index 431baa083f8d0..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionProvisioningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PrivateEndpointConnectionProvisioningState. */ -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 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 deleted file mode 100644 index 0ae6d5ef7e2ee..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionWithSystemData.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.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 deleted file mode 100644 index 0d1c6c2e8a81d..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnections.java +++ /dev/null @@ -1,270 +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.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 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 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, 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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. - * @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); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); -} 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 deleted file mode 100644 index 816b053c362db..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointServiceConnectionStatus.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PrivateEndpointServiceConnectionStatus. */ -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 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 deleted file mode 100644 index 33100e2656b90..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResource.java +++ /dev/null @@ -1,60 +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.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/PrivateLinkResources.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResources.java deleted file mode 100644 index 95ff8296e2b0f..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResources.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.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 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 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, 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. - * @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 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, 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 deleted file mode 100644 index 03e22215f9ffa..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkServiceConnectionState.java +++ /dev/null @@ -1,104 +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.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; - - /** - * 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 deleted file mode 100644 index a183511821834..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PublicNetworkAccess.java +++ /dev/null @@ -1,38 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PublicNetworkAccess. */ -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 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/RegistrationInfoPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationInfoPatch.java index db1838355a7e3..6c2a45bfd2b50 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationInfoPatch.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationInfoPatch.java @@ -23,6 +23,10 @@ public final class RegistrationInfoPatch { @JsonProperty(value = "registrationTokenOperation") private RegistrationTokenOperation registrationTokenOperation; + /** Creates an instance of RegistrationInfoPatch class. */ + public RegistrationInfoPatch() { + } + /** * Get the expirationTime property: Expiration time of registration token. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationTokenOperation.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationTokenOperation.java index 544d8c78d89be..43e3cefb68a48 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationTokenOperation.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationTokenOperation.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RegistrationTokenOperation. */ +/** The type of resetting the token. */ public final class RegistrationTokenOperation extends ExpandableStringEnum { /** Static value Delete for RegistrationTokenOperation. */ public static final RegistrationTokenOperation DELETE = fromString("Delete"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RemoteApplicationType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RemoteApplicationType.java index f9ce502b0422d..14f33535d672e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RemoteApplicationType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RemoteApplicationType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RemoteApplicationType. */ +/** Resource Type of Application. */ public final class RemoteApplicationType extends ExpandableStringEnum { /** Static value InBuilt for RemoteApplicationType. */ public static final RemoteApplicationType IN_BUILT = fromString("InBuilt"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceIdentityType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceIdentityType.java index e68e5471002a8..8254c935fc578 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceIdentityType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceIdentityType.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for ResourceIdentityType. */ +/** The identity type. */ public enum ResourceIdentityType { /** Enum value SystemAssigned. */ SYSTEM_ASSIGNED("SystemAssigned"); @@ -27,6 +27,9 @@ public enum ResourceIdentityType { */ @JsonCreator public static ResourceIdentityType fromString(String value) { + if (value == null) { + return null; + } ResourceIdentityType[] items = ResourceIdentityType.values(); for (ResourceIdentityType item : items) { if (item.toString().equalsIgnoreCase(value)) { @@ -36,6 +39,7 @@ public static ResourceIdentityType fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySet.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySet.java index 2cbbcde64ca50..f9d419cfd7764 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySet.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySet.java @@ -16,31 +16,26 @@ @Fluent public class ResourceModelWithAllowedPropertySet extends Resource { /* - * The fully qualified resource ID of the resource that manages this - * resource. Indicates if this resource is managed by another Azure - * resource. If this is present, complete mode deployment will not delete - * the resource if it is removed from the template since it is managed by - * another resource. + * The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is + * managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if + * it is removed from the template since it is managed by another resource. */ @JsonProperty(value = "managedBy") private String managedBy; /* - * Metadata used by portal/tooling/etc to render different UX experiences - * for resources of the same type; e.g. ApiApps are a kind of - * Microsoft.Web/sites type. If supported, the resource provider must - * validate and persist this value. + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. + * ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist + * this value. */ @JsonProperty(value = "kind") private String kind; /* - * The etag field is *not* required. If it is provided in the response - * body, it must also be provided as a header per the normal etag - * convention. Entity tags are used for comparing two or more entities - * from the same requested resource. HTTP/1.1 uses entity tags in the etag - * (section 14.19), If-Match (section 14.24), If-None-Match (section - * 14.26), and If-Range (section 14.27) header fields. + * The etag field is *not* required. If it is provided in the response body, it must also be provided as a header + * per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested + * resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match + * (section 14.26), and If-Range (section 14.27) header fields. */ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag; @@ -63,6 +58,10 @@ public class ResourceModelWithAllowedPropertySet extends Resource { @JsonProperty(value = "plan") private ResourceModelWithAllowedPropertySetPlan plan; + /** Creates an instance of ResourceModelWithAllowedPropertySet class. */ + public ResourceModelWithAllowedPropertySet() { + } + /** * Get the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetIdentity.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetIdentity.java index 16ff33b98e659..bdc0ecc78c19b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetIdentity.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetIdentity.java @@ -9,6 +9,10 @@ /** The ResourceModelWithAllowedPropertySetIdentity model. */ @Fluent public class ResourceModelWithAllowedPropertySetIdentity extends Identity { + /** Creates an instance of ResourceModelWithAllowedPropertySetIdentity class. */ + public ResourceModelWithAllowedPropertySetIdentity() { + } + /** {@inheritDoc} */ @Override public ResourceModelWithAllowedPropertySetIdentity withType(ResourceIdentityType type) { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetPlan.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetPlan.java index 2c156f2a49406..5d11137579bdc 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetPlan.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetPlan.java @@ -9,6 +9,10 @@ /** The ResourceModelWithAllowedPropertySetPlan model. */ @Fluent public final class ResourceModelWithAllowedPropertySetPlan extends Plan { + /** Creates an instance of ResourceModelWithAllowedPropertySetPlan class. */ + public ResourceModelWithAllowedPropertySetPlan() { + } + /** {@inheritDoc} */ @Override public ResourceModelWithAllowedPropertySetPlan withName(String name) { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetSku.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetSku.java index 5fd01a6fe6e5a..2ec2cc8ec5424 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetSku.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetSku.java @@ -9,6 +9,10 @@ /** The ResourceModelWithAllowedPropertySetSku model. */ @Fluent public final class ResourceModelWithAllowedPropertySetSku extends Sku { + /** Creates an instance of ResourceModelWithAllowedPropertySetSku class. */ + public ResourceModelWithAllowedPropertySetSku() { + } + /** {@inheritDoc} */ @Override public ResourceModelWithAllowedPropertySetSku withName(String name) { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationDisplay.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationDisplay.java index b4726d48564d4..560241227dcd2 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationDisplay.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationDisplay.java @@ -34,6 +34,10 @@ public final class ResourceProviderOperationDisplay { @JsonProperty(value = "description") private String description; + /** Creates an instance of ResourceProviderOperationDisplay class. */ + public ResourceProviderOperationDisplay() { + } + /** * Get the provider property: Resource provider: Microsoft Desktop Virtualization. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationList.java index 85156746bca38..bdca1b7e5ebb1 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationList.java @@ -24,6 +24,10 @@ public final class ResourceProviderOperationList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ResourceProviderOperationList class. */ + public ResourceProviderOperationList() { + } + /** * Get the value property: List of operations supported by this resource provider. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolReference.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolReference.java index 4df9316cad231..a30a6af5a87d7 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolReference.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolReference.java @@ -22,6 +22,10 @@ public final class ScalingHostPoolReference { @JsonProperty(value = "scalingPlanEnabled") private Boolean scalingPlanEnabled; + /** Creates an instance of ScalingHostPoolReference class. */ + public ScalingHostPoolReference() { + } + /** * Get the hostPoolArmPath property: Arm path of referenced hostpool. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolType.java index 05e1dda8387fb..e631c2efad3bf 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScalingHostPoolType. */ +/** HostPool type for desktop. */ public final class ScalingHostPoolType extends ExpandableStringEnum { /** Static value Pooled for ScalingHostPoolType. */ public static final ScalingHostPoolType POOLED = fromString("Pooled"); 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 29cf7b1e4b470..f20d464d6df45 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 @@ -147,7 +147,7 @@ public interface ScalingPlan { String exclusionTag(); /** - * Gets the schedules property: List of ScalingSchedule definitions. + * Gets the schedules property: List of ScalingPlanPooledSchedule definitions. * * @return the schedules value. */ @@ -193,6 +193,7 @@ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, + DefinitionStages.WithTimeZone, DefinitionStages.WithCreate { } /** The ScalingPlan definition stages. */ @@ -226,7 +227,17 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithTimeZone withExistingResourceGroup(String resourceGroupName); + } + /** The stage of the ScalingPlan definition allowing to specify timeZone. */ + interface WithTimeZone { + /** + * Specifies the timeZone property: Timezone of the scaling plan.. + * + * @param timeZone Timezone of the scaling plan. + * @return the next definition stage. + */ + WithCreate withTimeZone(String timeZone); } /** * The stage of the ScalingPlan definition which contains all the minimum required properties for the resource @@ -241,7 +252,6 @@ interface WithCreate DefinitionStages.WithPlan, DefinitionStages.WithDescription, DefinitionStages.WithFriendlyName, - DefinitionStages.WithTimeZone, DefinitionStages.WithHostPoolType, DefinitionStages.WithExclusionTag, DefinitionStages.WithSchedules, @@ -350,16 +360,6 @@ interface WithFriendlyName { */ WithCreate withFriendlyName(String friendlyName); } - /** The stage of the ScalingPlan definition allowing to specify timeZone. */ - interface WithTimeZone { - /** - * Specifies the timeZone property: Timezone of the scaling plan.. - * - * @param timeZone Timezone of the scaling plan. - * @return the next definition stage. - */ - WithCreate withTimeZone(String timeZone); - } /** The stage of the ScalingPlan definition allowing to specify hostPoolType. */ interface WithHostPoolType { /** @@ -383,9 +383,9 @@ interface WithExclusionTag { /** The stage of the ScalingPlan definition allowing to specify schedules. */ interface WithSchedules { /** - * Specifies the schedules property: List of ScalingSchedule definitions.. + * Specifies the schedules property: List of ScalingPlanPooledSchedule definitions.. * - * @param schedules List of ScalingSchedule definitions. + * @param schedules List of ScalingPlanPooledSchedule definitions. * @return the next definition stage. */ WithCreate withSchedules(List schedules); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanList.java index a47d5f3327611..b27ef7c0f7f90 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanList.java @@ -9,7 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** ScalingPlanList List of scaling plan definitions. */ +/** + * ScalingPlanList + * + *

List of scaling plan definitions. + */ @Fluent public final class ScalingPlanList { /* @@ -24,6 +28,10 @@ public final class ScalingPlanList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ScalingPlanList class. */ + public ScalingPlanList() { + } + /** * Get the value property: List of scaling plan definitions. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPatch.java index 4750a92d501d4..381e4a076f8c0 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPatch.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPatch.java @@ -27,6 +27,10 @@ public final class ScalingPlanPatch { @JsonProperty(value = "properties") private ScalingPlanPatchProperties innerProperties; + /** Creates an instance of ScalingPlanPatch class. */ + public ScalingPlanPatch() { + } + /** * Get the tags property: tags to be updated. * 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 new file mode 100644 index 0000000000000..9501a7780c9a3 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedule.java @@ -0,0 +1,638 @@ +// 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.ScalingPlanPooledScheduleInner; +import java.util.List; + +/** An immutable client-side representation of ScalingPlanPooledSchedule. */ +public interface ScalingPlanPooledSchedule { + /** + * 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 rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period. + * + * @return the rampUpLoadBalancingAlgorithm value. + */ + SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm(); + + /** + * Gets the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period. + * + * @return the rampUpMinimumHostsPct value. + */ + Integer rampUpMinimumHostsPct(); + + /** + * Gets the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. + * + * @return the rampUpCapacityThresholdPct value. + */ + Integer rampUpCapacityThresholdPct(); + + /** + * Gets the peakStartTime property: Starting time for peak period. + * + * @return the peakStartTime value. + */ + Time peakStartTime(); + + /** + * Gets the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period. + * + * @return the peakLoadBalancingAlgorithm value. + */ + SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm(); + + /** + * Gets the rampDownStartTime property: Starting time for ramp down period. + * + * @return the rampDownStartTime value. + */ + Time rampDownStartTime(); + + /** + * Gets the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period. + * + * @return the rampDownLoadBalancingAlgorithm value. + */ + SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm(); + + /** + * Gets the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period. + * + * @return the rampDownMinimumHostsPct value. + */ + Integer rampDownMinimumHostsPct(); + + /** + * Gets the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. + * + * @return the rampDownCapacityThresholdPct value. + */ + Integer rampDownCapacityThresholdPct(); + + /** + * Gets the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts. + * + * @return the rampDownForceLogoffUsers value. + */ + Boolean rampDownForceLogoffUsers(); + + /** + * Gets the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period. + * + * @return the rampDownStopHostsWhen value. + */ + StopHostsWhen rampDownStopHostsWhen(); + + /** + * Gets the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down period. + * + * @return the rampDownWaitTimeMinutes value. + */ + Integer rampDownWaitTimeMinutes(); + + /** + * Gets the rampDownNotificationMessage property: Notification message for users during ramp down period. + * + * @return the rampDownNotificationMessage value. + */ + String rampDownNotificationMessage(); + + /** + * Gets the offPeakStartTime property: Starting time for off-peak period. + * + * @return the offPeakStartTime value. + */ + Time offPeakStartTime(); + + /** + * Gets the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period. + * + * @return the offPeakLoadBalancingAlgorithm value. + */ + SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm(); + + /** + * 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.ScalingPlanPooledScheduleInner + * object. + * + * @return the inner object. + */ + ScalingPlanPooledScheduleInner innerModel(); + + /** The entirety of the ScalingPlanPooledSchedule definition. */ + 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 { + /** + * 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 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. + */ + interface WithCreate + extends DefinitionStages.WithDaysOfWeek, + DefinitionStages.WithRampUpStartTime, + DefinitionStages.WithRampUpLoadBalancingAlgorithm, + DefinitionStages.WithRampUpMinimumHostsPct, + DefinitionStages.WithRampUpCapacityThresholdPct, + DefinitionStages.WithPeakStartTime, + DefinitionStages.WithPeakLoadBalancingAlgorithm, + DefinitionStages.WithRampDownStartTime, + DefinitionStages.WithRampDownLoadBalancingAlgorithm, + DefinitionStages.WithRampDownMinimumHostsPct, + DefinitionStages.WithRampDownCapacityThresholdPct, + DefinitionStages.WithRampDownForceLogoffUsers, + DefinitionStages.WithRampDownStopHostsWhen, + DefinitionStages.WithRampDownWaitTimeMinutes, + DefinitionStages.WithRampDownNotificationMessage, + DefinitionStages.WithOffPeakStartTime, + DefinitionStages.WithOffPeakLoadBalancingAlgorithm { + /** + * Executes the create request. + * + * @return the created resource. + */ + ScalingPlanPooledSchedule create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ScalingPlanPooledSchedule create(Context context); + } + /** The stage of the ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition allowing to specify rampUpLoadBalancingAlgorithm. */ + interface WithRampUpLoadBalancingAlgorithm { + /** + * Specifies the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period.. + * + * @param rampUpLoadBalancingAlgorithm Load balancing algorithm for ramp up period. + * @return the next definition stage. + */ + WithCreate withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm); + } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampUpMinimumHostsPct. */ + interface WithRampUpMinimumHostsPct { + /** + * Specifies the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period.. + * + * @param rampUpMinimumHostsPct Minimum host percentage for ramp up period. + * @return the next definition stage. + */ + WithCreate withRampUpMinimumHostsPct(Integer rampUpMinimumHostsPct); + } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampUpCapacityThresholdPct. */ + interface WithRampUpCapacityThresholdPct { + /** + * Specifies the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period.. + * + * @param rampUpCapacityThresholdPct Capacity threshold for ramp up period. + * @return the next definition stage. + */ + WithCreate withRampUpCapacityThresholdPct(Integer rampUpCapacityThresholdPct); + } + /** The stage of the ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition allowing to specify peakLoadBalancingAlgorithm. */ + interface WithPeakLoadBalancingAlgorithm { + /** + * Specifies the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period.. + * + * @param peakLoadBalancingAlgorithm Load balancing algorithm for peak period. + * @return the next definition stage. + */ + WithCreate withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm); + } + /** The stage of the ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition allowing to specify rampDownLoadBalancingAlgorithm. */ + interface WithRampDownLoadBalancingAlgorithm { + /** + * Specifies the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period.. + * + * @param rampDownLoadBalancingAlgorithm Load balancing algorithm for ramp down period. + * @return the next definition stage. + */ + WithCreate withRampDownLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm); + } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownMinimumHostsPct. */ + interface WithRampDownMinimumHostsPct { + /** + * Specifies the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period.. + * + * @param rampDownMinimumHostsPct Minimum host percentage for ramp down period. + * @return the next definition stage. + */ + WithCreate withRampDownMinimumHostsPct(Integer rampDownMinimumHostsPct); + } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownCapacityThresholdPct. */ + interface WithRampDownCapacityThresholdPct { + /** + * Specifies the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period.. + * + * @param rampDownCapacityThresholdPct Capacity threshold for ramp down period. + * @return the next definition stage. + */ + WithCreate withRampDownCapacityThresholdPct(Integer rampDownCapacityThresholdPct); + } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownForceLogoffUsers. */ + interface WithRampDownForceLogoffUsers { + /** + * Specifies the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts.. + * + * @param rampDownForceLogoffUsers Should users be logged off forcefully from hosts. + * @return the next definition stage. + */ + WithCreate withRampDownForceLogoffUsers(Boolean rampDownForceLogoffUsers); + } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownStopHostsWhen. */ + interface WithRampDownStopHostsWhen { + /** + * Specifies the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period.. + * + * @param rampDownStopHostsWhen Specifies when to stop hosts during ramp down period. + * @return the next definition stage. + */ + WithCreate withRampDownStopHostsWhen(StopHostsWhen rampDownStopHostsWhen); + } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownWaitTimeMinutes. */ + interface WithRampDownWaitTimeMinutes { + /** + * Specifies the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down + * period.. + * + * @param rampDownWaitTimeMinutes Number of minutes to wait to stop hosts during ramp down period. + * @return the next definition stage. + */ + WithCreate withRampDownWaitTimeMinutes(Integer rampDownWaitTimeMinutes); + } + /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownNotificationMessage. */ + interface WithRampDownNotificationMessage { + /** + * Specifies the rampDownNotificationMessage property: Notification message for users during ramp down + * period.. + * + * @param rampDownNotificationMessage Notification message for users during ramp down period. + * @return the next definition stage. + */ + WithCreate withRampDownNotificationMessage(String rampDownNotificationMessage); + } + /** The stage of the ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule definition allowing to specify offPeakLoadBalancingAlgorithm. */ + interface WithOffPeakLoadBalancingAlgorithm { + /** + * Specifies the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period.. + * + * @param offPeakLoadBalancingAlgorithm Load balancing algorithm for off-peak period. + * @return the next definition stage. + */ + WithCreate withOffPeakLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm); + } + } + /** + * Begins update for the ScalingPlanPooledSchedule resource. + * + * @return the stage of resource update. + */ + ScalingPlanPooledSchedule.Update update(); + + /** The template for ScalingPlanPooledSchedule update. */ + interface Update + extends UpdateStages.WithDaysOfWeek, + UpdateStages.WithRampUpStartTime, + UpdateStages.WithRampUpLoadBalancingAlgorithm, + UpdateStages.WithRampUpMinimumHostsPct, + UpdateStages.WithRampUpCapacityThresholdPct, + UpdateStages.WithPeakStartTime, + UpdateStages.WithPeakLoadBalancingAlgorithm, + UpdateStages.WithRampDownStartTime, + UpdateStages.WithRampDownLoadBalancingAlgorithm, + UpdateStages.WithRampDownMinimumHostsPct, + UpdateStages.WithRampDownCapacityThresholdPct, + UpdateStages.WithRampDownForceLogoffUsers, + UpdateStages.WithRampDownStopHostsWhen, + UpdateStages.WithRampDownWaitTimeMinutes, + UpdateStages.WithRampDownNotificationMessage, + UpdateStages.WithOffPeakStartTime, + UpdateStages.WithOffPeakLoadBalancingAlgorithm { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ScalingPlanPooledSchedule apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ScalingPlanPooledSchedule apply(Context context); + } + /** The ScalingPlanPooledSchedule update stages. */ + interface UpdateStages { + /** The stage of the ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule update allowing to specify rampUpLoadBalancingAlgorithm. */ + interface WithRampUpLoadBalancingAlgorithm { + /** + * Specifies the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period.. + * + * @param rampUpLoadBalancingAlgorithm Load balancing algorithm for ramp up period. + * @return the next definition stage. + */ + Update withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm); + } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampUpMinimumHostsPct. */ + interface WithRampUpMinimumHostsPct { + /** + * Specifies the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period.. + * + * @param rampUpMinimumHostsPct Minimum host percentage for ramp up period. + * @return the next definition stage. + */ + Update withRampUpMinimumHostsPct(Integer rampUpMinimumHostsPct); + } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampUpCapacityThresholdPct. */ + interface WithRampUpCapacityThresholdPct { + /** + * Specifies the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period.. + * + * @param rampUpCapacityThresholdPct Capacity threshold for ramp up period. + * @return the next definition stage. + */ + Update withRampUpCapacityThresholdPct(Integer rampUpCapacityThresholdPct); + } + /** The stage of the ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule update allowing to specify peakLoadBalancingAlgorithm. */ + interface WithPeakLoadBalancingAlgorithm { + /** + * Specifies the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period.. + * + * @param peakLoadBalancingAlgorithm Load balancing algorithm for peak period. + * @return the next definition stage. + */ + Update withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm); + } + /** The stage of the ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule update allowing to specify rampDownLoadBalancingAlgorithm. */ + interface WithRampDownLoadBalancingAlgorithm { + /** + * Specifies the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period.. + * + * @param rampDownLoadBalancingAlgorithm Load balancing algorithm for ramp down period. + * @return the next definition stage. + */ + Update withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm); + } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampDownMinimumHostsPct. */ + interface WithRampDownMinimumHostsPct { + /** + * Specifies the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period.. + * + * @param rampDownMinimumHostsPct Minimum host percentage for ramp down period. + * @return the next definition stage. + */ + Update withRampDownMinimumHostsPct(Integer rampDownMinimumHostsPct); + } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampDownCapacityThresholdPct. */ + interface WithRampDownCapacityThresholdPct { + /** + * Specifies the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period.. + * + * @param rampDownCapacityThresholdPct Capacity threshold for ramp down period. + * @return the next definition stage. + */ + Update withRampDownCapacityThresholdPct(Integer rampDownCapacityThresholdPct); + } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampDownForceLogoffUsers. */ + interface WithRampDownForceLogoffUsers { + /** + * Specifies the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts.. + * + * @param rampDownForceLogoffUsers Should users be logged off forcefully from hosts. + * @return the next definition stage. + */ + Update withRampDownForceLogoffUsers(Boolean rampDownForceLogoffUsers); + } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampDownStopHostsWhen. */ + interface WithRampDownStopHostsWhen { + /** + * Specifies the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period.. + * + * @param rampDownStopHostsWhen Specifies when to stop hosts during ramp down period. + * @return the next definition stage. + */ + Update withRampDownStopHostsWhen(StopHostsWhen rampDownStopHostsWhen); + } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampDownWaitTimeMinutes. */ + interface WithRampDownWaitTimeMinutes { + /** + * Specifies the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down + * period.. + * + * @param rampDownWaitTimeMinutes Number of minutes to wait to stop hosts during ramp down period. + * @return the next definition stage. + */ + Update withRampDownWaitTimeMinutes(Integer rampDownWaitTimeMinutes); + } + /** The stage of the ScalingPlanPooledSchedule update allowing to specify rampDownNotificationMessage. */ + interface WithRampDownNotificationMessage { + /** + * Specifies the rampDownNotificationMessage property: Notification message for users during ramp down + * period.. + * + * @param rampDownNotificationMessage Notification message for users during ramp down period. + * @return the next definition stage. + */ + Update withRampDownNotificationMessage(String rampDownNotificationMessage); + } + /** The stage of the ScalingPlanPooledSchedule 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 ScalingPlanPooledSchedule update allowing to specify offPeakLoadBalancingAlgorithm. */ + interface WithOffPeakLoadBalancingAlgorithm { + /** + * Specifies the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period.. + * + * @param offPeakLoadBalancingAlgorithm Load balancing algorithm for off-peak period. + * @return the next definition stage. + */ + Update withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ScalingPlanPooledSchedule refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ScalingPlanPooledSchedule refresh(Context context); +} 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/ScalingPlanPooledScheduleList.java similarity index 61% rename from sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResourceListResult.java rename to sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledScheduleList.java index dd0576a016c3e..ef6ffd32c6f85 100644 --- 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/ScalingPlanPooledScheduleList.java @@ -5,18 +5,22 @@ package com.azure.resourcemanager.desktopvirtualization.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of private link resources. */ +/** + * ScalingPlanPooledScheduleList + * + *

List of ScalingPlanPooledSchedule definitions. + */ @Fluent -public final class PrivateLinkResourceListResult { +public final class ScalingPlanPooledScheduleList { /* - * Array of private link resources + * List of ScalingPlanPooledSchedule definitions. */ @JsonProperty(value = "value") - private List value; + private List value; /* * Link to the next page of results. @@ -24,22 +28,26 @@ public final class PrivateLinkResourceListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ScalingPlanPooledScheduleList class. */ + public ScalingPlanPooledScheduleList() { + } + /** - * Get the value property: Array of private link resources. + * Get the value property: List of ScalingPlanPooledSchedule definitions. * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Set the value property: Array of private link resources. + * Set the value property: List of ScalingPlanPooledSchedule definitions. * * @param value the value value to set. - * @return the PrivateLinkResourceListResult object itself. + * @return the ScalingPlanPooledScheduleList object itself. */ - public PrivateLinkResourceListResult withValue(List value) { + public ScalingPlanPooledScheduleList withValue(List value) { this.value = value; return this; } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedulePatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedulePatch.java new file mode 100644 index 0000000000000..ac5373c62d053 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedulePatch.java @@ -0,0 +1,440 @@ +// 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.ScalingPlanPooledScheduleProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** ScalingPlanPooledSchedule properties that can be patched. */ +@Fluent +public final class ScalingPlanPooledSchedulePatch extends ProxyResource { + /* + * Detailed properties for ScalingPlanPooledSchedule + */ + @JsonProperty(value = "properties") + private ScalingPlanPooledScheduleProperties innerProperties; + + /** Creates an instance of ScalingPlanPooledSchedulePatch class. */ + public ScalingPlanPooledSchedulePatch() { + } + + /** + * Get the innerProperties property: Detailed properties for ScalingPlanPooledSchedule. + * + * @return the innerProperties value. + */ + private ScalingPlanPooledScheduleProperties 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 ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withDaysOfWeek(List daysOfWeek) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + 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 ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withRampUpStartTime(Time rampUpStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampUpStartTime(rampUpStartTime); + return this; + } + + /** + * Get the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period. + * + * @return the rampUpLoadBalancingAlgorithm value. + */ + public SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpLoadBalancingAlgorithm(); + } + + /** + * Set the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period. + * + * @param rampUpLoadBalancingAlgorithm the rampUpLoadBalancingAlgorithm value to set. + * @return the ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withRampUpLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampUpLoadBalancingAlgorithm(rampUpLoadBalancingAlgorithm); + return this; + } + + /** + * Get the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period. + * + * @return the rampUpMinimumHostsPct value. + */ + public Integer rampUpMinimumHostsPct() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpMinimumHostsPct(); + } + + /** + * Set the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period. + * + * @param rampUpMinimumHostsPct the rampUpMinimumHostsPct value to set. + * @return the ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withRampUpMinimumHostsPct(Integer rampUpMinimumHostsPct) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampUpMinimumHostsPct(rampUpMinimumHostsPct); + return this; + } + + /** + * Get the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. + * + * @return the rampUpCapacityThresholdPct value. + */ + public Integer rampUpCapacityThresholdPct() { + return this.innerProperties() == null ? null : this.innerProperties().rampUpCapacityThresholdPct(); + } + + /** + * Set the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. + * + * @param rampUpCapacityThresholdPct the rampUpCapacityThresholdPct value to set. + * @return the ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withRampUpCapacityThresholdPct(Integer rampUpCapacityThresholdPct) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampUpCapacityThresholdPct(rampUpCapacityThresholdPct); + 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 ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withPeakStartTime(Time peakStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withPeakStartTime(peakStartTime); + return this; + } + + /** + * Get the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period. + * + * @return the peakLoadBalancingAlgorithm value. + */ + public SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm() { + return this.innerProperties() == null ? null : this.innerProperties().peakLoadBalancingAlgorithm(); + } + + /** + * Set the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period. + * + * @param peakLoadBalancingAlgorithm the peakLoadBalancingAlgorithm value to set. + * @return the ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withPeakLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withPeakLoadBalancingAlgorithm(peakLoadBalancingAlgorithm); + 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 ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withRampDownStartTime(Time rampDownStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownStartTime(rampDownStartTime); + return this; + } + + /** + * Get the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period. + * + * @return the rampDownLoadBalancingAlgorithm value. + */ + public SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownLoadBalancingAlgorithm(); + } + + /** + * Set the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period. + * + * @param rampDownLoadBalancingAlgorithm the rampDownLoadBalancingAlgorithm value to set. + * @return the ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withRampDownLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownLoadBalancingAlgorithm(rampDownLoadBalancingAlgorithm); + return this; + } + + /** + * Get the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period. + * + * @return the rampDownMinimumHostsPct value. + */ + public Integer rampDownMinimumHostsPct() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownMinimumHostsPct(); + } + + /** + * Set the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period. + * + * @param rampDownMinimumHostsPct the rampDownMinimumHostsPct value to set. + * @return the ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withRampDownMinimumHostsPct(Integer rampDownMinimumHostsPct) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownMinimumHostsPct(rampDownMinimumHostsPct); + return this; + } + + /** + * Get the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. + * + * @return the rampDownCapacityThresholdPct value. + */ + public Integer rampDownCapacityThresholdPct() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownCapacityThresholdPct(); + } + + /** + * Set the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. + * + * @param rampDownCapacityThresholdPct the rampDownCapacityThresholdPct value to set. + * @return the ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withRampDownCapacityThresholdPct(Integer rampDownCapacityThresholdPct) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownCapacityThresholdPct(rampDownCapacityThresholdPct); + return this; + } + + /** + * Get the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts. + * + * @return the rampDownForceLogoffUsers value. + */ + public Boolean rampDownForceLogoffUsers() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownForceLogoffUsers(); + } + + /** + * Set the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts. + * + * @param rampDownForceLogoffUsers the rampDownForceLogoffUsers value to set. + * @return the ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withRampDownForceLogoffUsers(Boolean rampDownForceLogoffUsers) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownForceLogoffUsers(rampDownForceLogoffUsers); + return this; + } + + /** + * Get the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period. + * + * @return the rampDownStopHostsWhen value. + */ + public StopHostsWhen rampDownStopHostsWhen() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownStopHostsWhen(); + } + + /** + * Set the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period. + * + * @param rampDownStopHostsWhen the rampDownStopHostsWhen value to set. + * @return the ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withRampDownStopHostsWhen(StopHostsWhen rampDownStopHostsWhen) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownStopHostsWhen(rampDownStopHostsWhen); + return this; + } + + /** + * Get the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down period. + * + * @return the rampDownWaitTimeMinutes value. + */ + public Integer rampDownWaitTimeMinutes() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownWaitTimeMinutes(); + } + + /** + * Set the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down period. + * + * @param rampDownWaitTimeMinutes the rampDownWaitTimeMinutes value to set. + * @return the ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withRampDownWaitTimeMinutes(Integer rampDownWaitTimeMinutes) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownWaitTimeMinutes(rampDownWaitTimeMinutes); + return this; + } + + /** + * Get the rampDownNotificationMessage property: Notification message for users during ramp down period. + * + * @return the rampDownNotificationMessage value. + */ + public String rampDownNotificationMessage() { + return this.innerProperties() == null ? null : this.innerProperties().rampDownNotificationMessage(); + } + + /** + * Set the rampDownNotificationMessage property: Notification message for users during ramp down period. + * + * @param rampDownNotificationMessage the rampDownNotificationMessage value to set. + * @return the ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withRampDownNotificationMessage(String rampDownNotificationMessage) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withRampDownNotificationMessage(rampDownNotificationMessage); + 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 ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withOffPeakStartTime(Time offPeakStartTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withOffPeakStartTime(offPeakStartTime); + return this; + } + + /** + * Get the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period. + * + * @return the offPeakLoadBalancingAlgorithm value. + */ + public SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm() { + return this.innerProperties() == null ? null : this.innerProperties().offPeakLoadBalancingAlgorithm(); + } + + /** + * Set the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period. + * + * @param offPeakLoadBalancingAlgorithm the offPeakLoadBalancingAlgorithm value to set. + * @return the ScalingPlanPooledSchedulePatch object itself. + */ + public ScalingPlanPooledSchedulePatch withOffPeakLoadBalancingAlgorithm( + SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm) { + if (this.innerProperties() == null) { + this.innerProperties = new ScalingPlanPooledScheduleProperties(); + } + this.innerProperties().withOffPeakLoadBalancingAlgorithm(offPeakLoadBalancingAlgorithm); + 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/ScalingPlanPooledSchedules.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedules.java new file mode 100644 index 0000000000000..282d38e9b4b52 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedules.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 ScalingPlanPooledSchedules. */ +public interface ScalingPlanPooledSchedules { + /** + * Get a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context); + + /** + * Get a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule. + */ + ScalingPlanPooledSchedule get(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * Remove a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedules. + * + * @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 scalingPlanPooledScheduleList as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String scalingPlanName); + + /** + * List ScalingPlanPooledSchedules. + * + * @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 scalingPlanPooledScheduleList as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String scalingPlanName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); + + /** + * Get a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule along with {@link Response}. + */ + ScalingPlanPooledSchedule getById(String id); + + /** + * Get a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Remove a ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule. + * + * @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 ScalingPlanPooledSchedule resource. + * + * @param name resource name. + * @return the first stage of the new ScalingPlanPooledSchedule definition. + */ + ScalingPlanPooledSchedule.DefinitionStages.Blank define(String name); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlans.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlans.java index 9bffab47ed23b..efce89a0a941e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlans.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlans.java @@ -15,50 +15,50 @@ public interface ScalingPlans { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. + * @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 scaling plan. + * @return a scaling plan along with {@link Response}. */ - ScalingPlan getByResourceGroup(String resourceGroupName, String scalingPlanName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String scalingPlanName, Context context); /** * Get a scaling plan. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. - * @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 scaling plan along with {@link Response}. + * @return a scaling plan. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String scalingPlanName, Context context); + ScalingPlan getByResourceGroup(String resourceGroupName, String scalingPlanName); /** * Remove a scaling plan. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. + * @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}. */ - void deleteByResourceGroup(String resourceGroupName, String scalingPlanName); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String scalingPlanName, Context context); /** * Remove a scaling plan. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. - * @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, Context context); + void deleteByResourceGroup(String resourceGroupName, String scalingPlanName); /** * List scaling plans. @@ -75,13 +75,17 @@ Response getByResourceGroupWithResponse( * List scaling plans. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 scalingPlanList as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * List scaling plans in subscription. @@ -95,13 +99,16 @@ Response getByResourceGroupWithResponse( /** * List scaling plans in subscription. * + * @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 scalingPlanList as paginated response with {@link PagedIterable}. */ - PagedIterable list(Context context); + PagedIterable list(Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * List scaling plan associated with hostpool. @@ -120,13 +127,22 @@ Response getByResourceGroupWithResponse( * * @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 scalingPlanList as paginated response with {@link PagedIterable}. */ - PagedIterable listByHostPool(String resourceGroupName, String hostPoolName, Context context); + PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * Get a scaling plan. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingSchedule.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingSchedule.java index d2fd0b152e471..dcf2877f4783c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingSchedule.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingSchedule.java @@ -8,11 +8,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Scaling plan schedule. */ +/** A ScalingPlanPooledSchedule. */ @Fluent public final class ScalingSchedule { /* - * Name of the scaling schedule. + * Name of the ScalingPlanPooledSchedule. */ @JsonProperty(value = "name") private String name; @@ -119,8 +119,12 @@ public final class ScalingSchedule { @JsonProperty(value = "offPeakLoadBalancingAlgorithm") private SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm; + /** Creates an instance of ScalingSchedule class. */ + public ScalingSchedule() { + } + /** - * Get the name property: Name of the scaling schedule. + * Get the name property: Name of the ScalingPlanPooledSchedule. * * @return the name value. */ @@ -129,7 +133,7 @@ public String name() { } /** - * Set the name property: Name of the scaling schedule. + * Set the name property: Name of the ScalingPlanPooledSchedule. * * @param name the name value to set. * @return the ScalingSchedule object itself. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SendMessage.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SendMessage.java index 34d22d5021e7d..83d0d8e3b8bf3 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SendMessage.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SendMessage.java @@ -22,6 +22,10 @@ public final class SendMessage { @JsonProperty(value = "messageBody") private String messageBody; + /** Creates an instance of SendMessage class. */ + public SendMessage() { + } + /** * Get the messageTitle property: Title of message. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ServiceSpecification.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ServiceSpecification.java index 503207d9978c8..83dc76eef9dbe 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ServiceSpecification.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ServiceSpecification.java @@ -17,6 +17,10 @@ public final class ServiceSpecification { @JsonProperty(value = "logSpecifications") private List logSpecifications; + /** Creates an instance of ServiceSpecification class. */ + public ServiceSpecification() { + } + /** * Get the logSpecifications property: Specifications of the Log for Azure Monitoring. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHost.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHost.java index 6ddf0409b52c9..7dcc7ec093a11 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHost.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHost.java @@ -95,6 +95,13 @@ public interface SessionHost { */ String assignedUser(); + /** + * Gets the friendlyName property: Friendly name of SessionHost. + * + * @return the friendlyName value. + */ + String friendlyName(); + /** * Gets the status property: Status for a SessionHost. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostComponentUpdateType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostComponentUpdateType.java new file mode 100644 index 0000000000000..00183897f561f --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostComponentUpdateType.java @@ -0,0 +1,38 @@ +// 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 type of maintenance for session host components. */ +public final class SessionHostComponentUpdateType extends ExpandableStringEnum { + /** Static value Default for SessionHostComponentUpdateType. */ + public static final SessionHostComponentUpdateType DEFAULT = fromString("Default"); + + /** Static value Scheduled for SessionHostComponentUpdateType. */ + public static final SessionHostComponentUpdateType SCHEDULED = fromString("Scheduled"); + + /** + * Creates or finds a SessionHostComponentUpdateType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SessionHostComponentUpdateType. + */ + @JsonCreator + public static SessionHostComponentUpdateType fromString(String name) { + return fromString(name, SessionHostComponentUpdateType.class); + } + + /** + * Gets known SessionHostComponentUpdateType values. + * + * @return known SessionHostComponentUpdateType values. + */ + public static Collection values() { + return values(SessionHostComponentUpdateType.class); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostHealthCheckFailureDetails.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostHealthCheckFailureDetails.java index e4a8baf041ff1..a230bae927285 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostHealthCheckFailureDetails.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostHealthCheckFailureDetails.java @@ -29,6 +29,10 @@ public final class SessionHostHealthCheckFailureDetails { @JsonProperty(value = "lastHealthCheckDateTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastHealthCheckDateTime; + /** Creates an instance of SessionHostHealthCheckFailureDetails class. */ + public SessionHostHealthCheckFailureDetails() { + } + /** * Get the message property: Failure message: hints on what is wrong and how to recover. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostHealthCheckReport.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostHealthCheckReport.java index 70e398b34c0e5..ffbb3359e9f46 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostHealthCheckReport.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostHealthCheckReport.java @@ -28,6 +28,10 @@ public final class SessionHostHealthCheckReport { @JsonProperty(value = "additionalFailureDetails", access = JsonProperty.Access.WRITE_ONLY) private SessionHostHealthCheckFailureDetails additionalFailureDetails; + /** Creates an instance of SessionHostHealthCheckReport class. */ + public SessionHostHealthCheckReport() { + } + /** * Get the healthCheckName property: Represents the name of the health check operation performed. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostList.java index e96f03f2685ed..98ee565fd7b39 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostList.java @@ -9,7 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** SessionHostList List of SessionHost definitions. */ +/** + * SessionHostList + * + *

List of SessionHost definitions. + */ @Fluent public final class SessionHostList { /* @@ -24,6 +28,10 @@ public final class SessionHostList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of SessionHostList class. */ + public SessionHostList() { + } + /** * Get the value property: List of SessionHost definitions. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostLoadBalancingAlgorithm.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostLoadBalancingAlgorithm.java index ea1ea4931296c..3ff03741011b2 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostLoadBalancingAlgorithm.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostLoadBalancingAlgorithm.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SessionHostLoadBalancingAlgorithm. */ +/** Load balancing algorithm for ramp up period. */ public final class SessionHostLoadBalancingAlgorithm extends ExpandableStringEnum { /** Static value BreadthFirst for SessionHostLoadBalancingAlgorithm. */ public static final SessionHostLoadBalancingAlgorithm BREADTH_FIRST = fromString("BreadthFirst"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostPatch.java index 3eb64d18cf78a..50376b0944676 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostPatch.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostPatch.java @@ -18,6 +18,10 @@ public final class SessionHostPatch extends ProxyResource { @JsonProperty(value = "properties") private SessionHostPatchProperties innerProperties; + /** Creates an instance of SessionHostPatch class. */ + public SessionHostPatch() { + } + /** * Get the innerProperties property: Detailed properties for SessionHost. * @@ -73,6 +77,29 @@ public SessionHostPatch withAssignedUser(String assignedUser) { return this; } + /** + * Get the friendlyName property: Friendly name of SessionHost. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); + } + + /** + * Set the friendlyName property: Friendly name of SessionHost. + * + * @param friendlyName the friendlyName value to set. + * @return the SessionHostPatch object itself. + */ + public SessionHostPatch withFriendlyName(String friendlyName) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionHostPatchProperties(); + } + this.innerProperties().withFriendlyName(friendlyName); + return this; + } + /** * Validates the instance. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHosts.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHosts.java index 8282d05ddfcd2..ca698cfc8556e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHosts.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHosts.java @@ -10,19 +10,6 @@ /** Resource collection API of SessionHosts. */ public interface SessionHosts { - /** - * Get a session host. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @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 session host. - */ - SessionHost get(String resourceGroupName, String hostPoolName, String sessionHostname); - /** * Get a session host. * @@ -39,7 +26,7 @@ Response getWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, Context context); /** - * Remove a SessionHost. + * Get a session host. * * @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. @@ -47,8 +34,9 @@ Response getWithResponse( * @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 session host. */ - void delete(String resourceGroupName, String hostPoolName, String sessionHostname); + SessionHost get(String resourceGroupName, String hostPoolName, String sessionHostname); /** * Remove a SessionHost. @@ -67,7 +55,7 @@ Response deleteWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force, Context context); /** - * Update a session host. + * Remove a SessionHost. * * @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. @@ -75,9 +63,8 @@ Response deleteWithResponse( * @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 SessionHost definition. */ - SessionHost update(String resourceGroupName, String hostPoolName, String sessionHostname); + void delete(String resourceGroupName, String hostPoolName, String sessionHostname); /** * Update a session host. @@ -101,6 +88,19 @@ Response updateWithResponse( SessionHostPatch sessionHost, Context context); + /** + * Update a session host. + * + * @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 sessionHostname The name of the session host within the specified host pool. + * @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 SessionHost definition. + */ + SessionHost update(String resourceGroupName, String hostPoolName, String sessionHostname); + /** * List sessionHosts. * @@ -118,11 +118,20 @@ Response updateWithResponse( * * @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 sessionHostList as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String hostPoolName, Context context); + PagedIterable list( + 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/SessionState.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionState.java index c9c1efca1f9eb..8596b608b8f09 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionState.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SessionState. */ +/** State of user session. */ public final class SessionState extends ExpandableStringEnum { /** Static value Unknown for SessionState. */ public static final SessionState UNKNOWN = fromString("Unknown"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Sku.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Sku.java index a543a91c3fbc2..f16cc2cafcf63 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Sku.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Sku.java @@ -18,34 +18,36 @@ public class Sku { private String name; /* - * This field is required to be implemented by the Resource Provider if the - * service has more than one tier, but is not required on a PUT. + * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is + * not required on a PUT. */ @JsonProperty(value = "tier") private SkuTier tier; /* - * The SKU size. When the name field is the combination of tier and some - * other value, this would be the standalone code. + * The SKU size. When the name field is the combination of tier and some other value, this would be the standalone + * code. */ @JsonProperty(value = "size") private String size; /* - * If the service has different generations of hardware, for the same SKU, - * then that can be captured here. + * If the service has different generations of hardware, for the same SKU, then that can be captured here. */ @JsonProperty(value = "family") private String family; /* - * If the SKU supports scale out/in then the capacity integer should be - * included. If scale out/in is not possible for the resource this may be - * omitted. + * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible + * for the resource this may be omitted. */ @JsonProperty(value = "capacity") private Integer capacity; + /** Creates an instance of Sku class. */ + public Sku() { + } + /** * Get the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SkuTier.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SkuTier.java index faace17799574..b65dbcdc83ebb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SkuTier.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SkuTier.java @@ -7,7 +7,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for SkuTier. */ +/** + * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not + * required on a PUT. + */ public enum SkuTier { /** Enum value Free. */ FREE("Free"), @@ -36,6 +39,9 @@ public enum SkuTier { */ @JsonCreator public static SkuTier fromString(String value) { + if (value == null) { + return null; + } SkuTier[] items = SkuTier.values(); for (SkuTier item : items) { if (item.toString().equalsIgnoreCase(value)) { @@ -45,6 +51,7 @@ public static SkuTier fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SsoSecretType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SsoSecretType.java index 462580bc02201..579420b907d42 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SsoSecretType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SsoSecretType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SsoSecretType. */ +/** The type of single sign on Secret Type. */ public final class SsoSecretType extends ExpandableStringEnum { /** Static value SharedKey for SsoSecretType. */ public static final SsoSecretType SHARED_KEY = fromString("SharedKey"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItemList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItemList.java index feb770a1eceea..16872bbd23db1 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItemList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItemList.java @@ -9,7 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** StartMenuItemList List of StartMenuItem definitions. */ +/** + * StartMenuItemList + * + *

List of StartMenuItem definitions. + */ @Fluent public final class StartMenuItemList { /* @@ -24,6 +28,10 @@ public final class StartMenuItemList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of StartMenuItemList class. */ + public StartMenuItemList() { + } + /** * Get the value property: List of StartMenuItem definitions. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItems.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItems.java index 60c432a84df86..8d9977a8b98db 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItems.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItems.java @@ -26,11 +26,20 @@ public interface StartMenuItems { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application 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 startMenuItemList as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String applicationGroupName, Context context); + PagedIterable list( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Status.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Status.java index b2fcc115408b6..761fc74699b0c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Status.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Status.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Status. */ +/** Status for a SessionHost. */ public final class Status extends ExpandableStringEnum { /** Static value Available for Status. */ public static final Status AVAILABLE = fromString("Available"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StopHostsWhen.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StopHostsWhen.java index 0bfe4a6e3aab1..832aca1553795 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StopHostsWhen.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StopHostsWhen.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for StopHostsWhen. */ +/** Specifies when to stop hosts during ramp down period. */ public final class StopHostsWhen extends ExpandableStringEnum { /** Static value ZeroSessions for StopHostsWhen. */ public static final StopHostsWhen ZERO_SESSIONS = fromString("ZeroSessions"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Time.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Time.java index 8f2d8a771369d..8e06cf5d8cfc7 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Time.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Time.java @@ -22,6 +22,10 @@ public final class Time { @JsonProperty(value = "minute", required = true) private int minute; + /** Creates an instance of Time class. */ + public Time() { + } + /** * Get the hour property: The hour. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UpdateState.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UpdateState.java index aed79e978f510..12955a4794151 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UpdateState.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UpdateState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for UpdateState. */ +/** Update state of a SessionHost. */ public final class UpdateState extends ExpandableStringEnum { /** Static value Initial for UpdateState. */ public static final UpdateState INITIAL = fromString("Initial"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSessionList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSessionList.java index cf387cc9975ca..b46192c4d4d35 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSessionList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSessionList.java @@ -9,7 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** UserSessionList List of UserSession definitions. */ +/** + * UserSessionList + * + *

List of UserSession definitions. + */ @Fluent public final class UserSessionList { /* @@ -24,6 +28,10 @@ public final class UserSessionList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of UserSessionList class. */ + public UserSessionList() { + } + /** * Get the value property: List of UserSession definitions. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSessions.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSessions.java index e187799880ecb..035c3aca7b269 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSessions.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSessions.java @@ -28,6 +28,9 @@ public interface UserSessions { * @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 filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. + * @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. @@ -35,21 +38,13 @@ public interface UserSessions { * @return userSessionList as paginated response with {@link PagedIterable}. */ PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName, String filter, Context context); - - /** - * Get a userSession. - * - * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @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 userSession. - */ - UserSession get(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + String resourceGroupName, + String hostPoolName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * Get a userSession. @@ -68,7 +63,7 @@ Response getWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context); /** - * Remove a userSession. + * Get a userSession. * * @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. @@ -77,8 +72,9 @@ Response getWithResponse( * @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 userSession. */ - void delete(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + UserSession get(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); /** * Remove a userSession. @@ -103,17 +99,17 @@ Response deleteWithResponse( Context context); /** - * List userSessions. + * Remove a userSession. * * @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 sessionHostname The name of the session host within the specified host pool. + * @param userSessionId The name of the user session within the specified session host. * @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 userSessionList as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String hostPoolName, String sessionHostname); + void delete(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); /** * List userSessions. @@ -121,27 +117,36 @@ Response deleteWithResponse( * @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 sessionHostname The name of the session host within the specified host pool. - * @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 userSessionList as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context); + PagedIterable list(String resourceGroupName, String hostPoolName, String sessionHostname); /** - * Disconnect a userSession. + * List userSessions. * * @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 sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. + * @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 userSessionList as paginated response with {@link PagedIterable}. */ - void disconnect(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + PagedIterable list( + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * Disconnect a userSession. @@ -160,7 +165,7 @@ Response disconnectWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context); /** - * Send a message to a user. + * Disconnect a userSession. * * @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. @@ -170,7 +175,7 @@ Response disconnectWithResponse( * @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 sendMessage(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + void disconnect(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); /** * Send a message to a user. @@ -193,4 +198,17 @@ Response sendMessageWithResponse( String userSessionId, SendMessage sendMessage, Context context); + + /** + * Send a message to a user. + * + * @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 sessionHostname The name of the session host within the specified host pool. + * @param userSessionId The name of the user session within the specified session host. + * @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 sendMessage(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); } 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 eff55777e1f30..c677cc2358adc 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,14 +139,6 @@ 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 region of the resource. * @@ -228,8 +220,7 @@ interface WithCreate DefinitionStages.WithPlan, DefinitionStages.WithDescription, DefinitionStages.WithFriendlyName, - DefinitionStages.WithApplicationGroupReferences, - DefinitionStages.WithPublicNetworkAccess { + DefinitionStages.WithApplicationGroupReferences { /** * Executes the create request. * @@ -344,18 +335,6 @@ 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. @@ -369,8 +348,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithDescription, UpdateStages.WithFriendlyName, - UpdateStages.WithApplicationGroupReferences, - UpdateStages.WithPublicNetworkAccess { + UpdateStages.WithApplicationGroupReferences { /** * Executes the update request. * @@ -428,17 +406,6 @@ 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/WorkspaceList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/WorkspaceList.java index 999aa194734f5..318ca2db9a64f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/WorkspaceList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/WorkspaceList.java @@ -9,7 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** WorkspaceList List of Workspace definitions. */ +/** + * WorkspaceList + * + *

List of Workspace definitions. + */ @Fluent public final class WorkspaceList { /* @@ -24,6 +28,10 @@ public final class WorkspaceList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of WorkspaceList class. */ + public WorkspaceList() { + } + /** * Get the value property: List of Workspace definitions. * 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 95718ba3661ce..d988b3eebbb73 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 @@ -27,6 +27,10 @@ public final class WorkspacePatch { @JsonProperty(value = "properties") private WorkspacePatchProperties innerProperties; + /** Creates an instance of WorkspacePatch class. */ + public WorkspacePatch() { + } + /** * Get the tags property: tags to be updated. * @@ -125,29 +129,6 @@ 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/main/java/com/azure/resourcemanager/desktopvirtualization/models/Workspaces.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Workspaces.java index 78b3a153138d9..be4529a32ef8a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Workspaces.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Workspaces.java @@ -15,49 +15,49 @@ public interface Workspaces { * * @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 a workspace. + * @return a workspace along with {@link Response}. */ - Workspace getByResourceGroup(String resourceGroupName, String workspaceName); + Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); /** * Get a workspace. * * @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 a workspace along with {@link Response}. + * @return a workspace. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); + Workspace getByResourceGroup(String resourceGroupName, String workspaceName); /** * Remove a workspace. * * @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 the {@link Response}. */ - void deleteByResourceGroup(String resourceGroupName, String workspaceName); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); /** * Remove a workspace. * * @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 the {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, Context context); + void deleteByResourceGroup(String resourceGroupName, String workspaceName); /** * List workspaces. @@ -74,13 +74,17 @@ public interface Workspaces { * List workspaces. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 workspaceList as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * List workspaces in subscription. 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 52f2134999d68..7a36e5613a07d 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 @@ -5,15 +5,13 @@ package com.azure.resourcemanager.desktopvirtualization.generated; import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupType; -import com.azure.resourcemanager.desktopvirtualization.models.MigrationRequestProperties; -import com.azure.resourcemanager.desktopvirtualization.models.Operation; import java.util.HashMap; import java.util.Map; /** Samples for ApplicationGroups CreateOrUpdate. */ public final class ApplicationGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Create.json */ /** * Sample code: ApplicationGroup_Create. @@ -33,11 +31,6 @@ public static void applicationGroupCreate( .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") - .withMigrationRequest( - new MigrationRequestProperties() - .withOperation(Operation.START) - .withMigrationPath( - "TenantGroups/{defaultV1TenantGroup.Name}/Tenants/{defaultV1Tenant.Name}/HostPools/{sessionHostPool.Name}")) .create(); } 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 1eb409b24342b..1db2ed85ca593 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 @@ -9,7 +9,7 @@ /** Samples for ApplicationGroups Delete. */ public final class ApplicationGroupsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Delete.json */ /** * Sample code: ApplicationGroup_Delete. @@ -18,6 +18,8 @@ public final class ApplicationGroupsDeleteSamples { */ public static void applicationGroupDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applicationGroups().deleteWithResponse("resourceGroup1", "applicationGroup1", Context.NONE); + manager + .applicationGroups() + .deleteByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", Context.NONE); } } 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 2ccf2d393cd8d..3e00aaffc7bad 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 @@ -9,7 +9,7 @@ /** Samples for ApplicationGroups GetByResourceGroup. */ public final class ApplicationGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 24de765ad64f4..93cf9d3a230e8 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 @@ -9,7 +9,7 @@ /** Samples for ApplicationGroups ListByResourceGroup. */ public final class ApplicationGroupsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_ListByResourceGroup.json */ /** * Sample code: ApplicationGroup_ListByResourceGroup. @@ -20,6 +20,7 @@ public static void applicationGroupListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .applicationGroups() - .listByResourceGroup("resourceGroup1", "applicationGroupType eq 'RailApplication'", Context.NONE); + .listByResourceGroup( + "resourceGroup1", "applicationGroupType eq 'RailApplication'", 10, true, 0, Context.NONE); } } 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 e1d1a1a960d37..9bbde3413d7a0 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 @@ -9,7 +9,7 @@ /** Samples for ApplicationGroups List. */ public final class ApplicationGroupsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 f2fa4c53d0325..a1b4d45b66d36 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 @@ -12,7 +12,7 @@ /** Samples for ApplicationGroups Update. */ public final class ApplicationGroupsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ApplicationGroup_Update.json */ /** * Sample code: ApplicationGroups_Update. 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 c2c5fd9b1e0de..d89fd6612123b 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/preview/2021-09-03-preview/examples/Application_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 c099b559d7f4d..2a17413b46d44 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 @@ -9,7 +9,7 @@ /** Samples for Applications Delete. */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Application_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 3a2b9c7606540..f908abb8ab5d8 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 @@ -9,7 +9,7 @@ /** Samples for Applications Get. */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Application_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 3d7b03f696fee..429b0a1e123fa 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 @@ -9,7 +9,7 @@ /** Samples for Applications List. */ public final class ApplicationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Application_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Application_List.json */ /** * Sample code: Applications_List. @@ -18,6 +18,6 @@ public final class ApplicationsListSamples { */ public static void applicationsList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applications().list("resourceGroup1", "applicationGroup1", Context.NONE); + manager.applications().list("resourceGroup1", "applicationGroup1", 10, true, 0, Context.NONE); } } 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 46c663075cdc8..2098f614cd869 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 @@ -12,7 +12,7 @@ /** Samples for Applications Update. */ public final class ApplicationsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Application_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 37d3d65196ee6..192ef402e8080 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 @@ -9,7 +9,7 @@ /** Samples for Desktops Get. */ public final class DesktopsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Desktop_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 5a62924a11d9e..9c56266552c85 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 @@ -9,7 +9,7 @@ /** Samples for Desktops List. */ public final class DesktopsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Desktop_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Desktop_List.json */ /** * Sample code: Desktop_List. @@ -18,6 +18,6 @@ public final class DesktopsListSamples { */ public static void desktopList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.desktops().list("resourceGroup1", "applicationGroup1", Context.NONE); + manager.desktops().list("resourceGroup1", "applicationGroup1", 10, true, 0, Context.NONE); } } 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 b2f8158a5d751..08ea3a556ccb9 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 @@ -10,7 +10,7 @@ /** Samples for Desktops Update. */ public final class DesktopsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Desktop_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 ae22378901538..27e47d22b18f5 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 @@ -5,23 +5,25 @@ package com.azure.resourcemanager.desktopvirtualization.generated; import com.azure.resourcemanager.desktopvirtualization.fluent.models.RegistrationInfoInner; +import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdateProperties; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; import com.azure.resourcemanager.desktopvirtualization.models.HostPoolType; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; -import com.azure.resourcemanager.desktopvirtualization.models.MigrationRequestProperties; -import com.azure.resourcemanager.desktopvirtualization.models.Operation; +import com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowProperties; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationTokenOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHostComponentUpdateType; import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for HostPools CreateOrUpdate. */ public final class HostPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_Create.json */ /** * Sample code: HostPool_Create. @@ -53,12 +55,16 @@ public static void hostPoolCreate( .withSsoClientSecretKeyVaultPath("https://keyvault/secret") .withSsoSecretType(SsoSecretType.SHARED_KEY) .withStartVMOnConnect(false) - .withMigrationRequest( - new MigrationRequestProperties() - .withOperation(Operation.START) - .withMigrationPath( - "TenantGroups/{defaultV1TenantGroup.Name}/Tenants/{defaultV1Tenant.Name}/HostPools/{sessionHostPool.Name}")) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .withAgentUpdate( + new AgentUpdateProperties() + .withType(SessionHostComponentUpdateType.SCHEDULED) + .withUseSessionHostLocalTime(false) + .withMaintenanceWindowTimeZone("Alaskan Standard Time") + .withMaintenanceWindows( + Arrays + .asList( + new MaintenanceWindowProperties().withHour(7).withDayOfWeek(DayOfWeek.FRIDAY), + new MaintenanceWindowProperties().withHour(8).withDayOfWeek(DayOfWeek.SATURDAY)))) .create(); } 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 4048e8b509966..9b3c27bd2ad90 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 @@ -9,7 +9,7 @@ /** Samples for HostPools Delete. */ public final class HostPoolsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 73be378540397..f102b43e5b495 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 @@ -9,7 +9,7 @@ /** Samples for HostPools GetByResourceGroup. */ public final class HostPoolsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 57b3331bdc4da..3aedd325c93ee 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 @@ -9,7 +9,7 @@ /** Samples for HostPools ListByResourceGroup. */ public final class HostPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_ListByResourceGroup.json */ /** * Sample code: HostPool_ListByResourceGroup. @@ -18,6 +18,6 @@ public final class HostPoolsListByResourceGroupSamples { */ public static void hostPoolListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.hostPools().listByResourceGroup("resourceGroup1", Context.NONE); + manager.hostPools().listByResourceGroup("resourceGroup1", 10, true, 0, Context.NONE); } } 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 7f31eba0b35d6..0841355e03ca9 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 @@ -9,7 +9,7 @@ /** Samples for HostPools List. */ public final class HostPoolsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_List.json */ /** * Sample code: HostPool_List. @@ -18,6 +18,6 @@ public final class HostPoolsListSamples { */ public static void hostPoolList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.hostPools().list(Context.NONE); + manager.hostPools().list(10, true, 0, Context.NONE); } } 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 1217d7455f891..dc1492cbc3eb0 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 @@ -9,7 +9,7 @@ /** Samples for HostPools RetrieveRegistrationToken. */ public final class HostPoolsRetrieveRegistrationTokenSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPools_RetrieveRegistrationToken_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 8a2d17b55fa63..0668fa0a1411d 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 @@ -5,21 +5,25 @@ package com.azure.resourcemanager.desktopvirtualization.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdatePatchProperties; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; import com.azure.resourcemanager.desktopvirtualization.models.HostPool; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; +import com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowPatchProperties; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfoPatch; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationTokenOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHostComponentUpdateType; import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for HostPools Update. */ public final class HostPoolsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/HostPool_Update.json */ /** * Sample code: HostPool_Update. @@ -48,7 +52,16 @@ public static void hostPoolUpdate( .withSsoClientSecretKeyVaultPath("https://keyvault/secret") .withSsoSecretType(SsoSecretType.SHARED_KEY) .withStartVMOnConnect(false) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .withAgentUpdate( + new AgentUpdatePatchProperties() + .withType(SessionHostComponentUpdateType.SCHEDULED) + .withUseSessionHostLocalTime(false) + .withMaintenanceWindowTimeZone("Alaskan Standard Time") + .withMaintenanceWindows( + Arrays + .asList( + new MaintenanceWindowPatchProperties().withHour(7).withDayOfWeek(DayOfWeek.FRIDAY), + new MaintenanceWindowPatchProperties().withHour(8).withDayOfWeek(DayOfWeek.SATURDAY)))) .apply(); } 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 d2029ac6ce985..e6426b2a6a279 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 @@ -10,7 +10,7 @@ /** Samples for MsixImages Expand. */ public final class MsixImagesExpandSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixImage_Expand_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 6e8ce1c8d30a9..f27a689b3bc01 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/preview/2021-09-03-preview/examples/MsixPackage_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 a55af6ce4dfbd..31704475a895e 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 @@ -9,7 +9,7 @@ /** Samples for MsixPackages Delete. */ public final class MsixPackagesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 be0b911b0b24d..50cb5bcb5ba8c 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 @@ -9,7 +9,7 @@ /** Samples for MsixPackages Get. */ public final class MsixPackagesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 dbc4807f2cec9..2ef92aa74c697 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 @@ -9,7 +9,7 @@ /** Samples for MsixPackages List. */ public final class MsixPackagesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/MsixPackage_List.json */ /** * Sample code: MSIXPackage_List. @@ -18,6 +18,6 @@ public final class MsixPackagesListSamples { */ public static void mSIXPackageList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.msixPackages().list("resourceGroup1", "hostpool1", Context.NONE); + manager.msixPackages().list("resourceGroup1", "hostpool1", 10, true, 0, Context.NONE); } } 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 3e619e1832493..2a6d43b1a21a8 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 @@ -10,7 +10,7 @@ /** Samples for MsixPackages Update. */ public final class MsixPackagesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 8792a0645ed71..7a98c90273624 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 @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/OperationDescription_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 deleted file mode 100644 index 8f2d1a9f635b6..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolSamples.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.Context; - -/** Samples for PrivateEndpointConnections DeleteByHostPool. */ -public final class PrivateEndpointConnectionsDeleteByHostPoolSamples { - /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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", 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 deleted file mode 100644 index d0164d11ef987..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceSamples.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.Context; - -/** Samples for PrivateEndpointConnections DeleteByWorkspace. */ -public final class PrivateEndpointConnectionsDeleteByWorkspaceSamples { - /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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", 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 deleted file mode 100644 index 9e0d97c52a8ec..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolSamples.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.Context; - -/** Samples for PrivateEndpointConnections GetByHostPool. */ -public final class PrivateEndpointConnectionsGetByHostPoolSamples { - /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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", 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 deleted file mode 100644 index 96e1177c3efea..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceSamples.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.Context; - -/** Samples for PrivateEndpointConnections GetByWorkspace. */ -public final class PrivateEndpointConnectionsGetByWorkspaceSamples { - /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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", 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 deleted file mode 100644 index 3b5f80d6e661b..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceSamples.java +++ /dev/null @@ -1,23 +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.Context; - -/** Samples for PrivateEndpointConnections ListByWorkspace. */ -public final class PrivateEndpointConnectionsListByWorkspaceSamples { - /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/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", 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 deleted file mode 100644 index de5eb44b36eda..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolSamples.java +++ /dev/null @@ -1,38 +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.Context; -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/preview/2021-09-03-preview/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")), - 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 deleted file mode 100644 index a9919b9c6f4c3..0000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceSamples.java +++ /dev/null @@ -1,38 +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.Context; -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/preview/2021-09-03-preview/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")), - Context.NONE); - } -} 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 new file mode 100644 index 0000000000000..ff2ce65425727 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateSamples.java @@ -0,0 +1,49 @@ +// 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.SessionHostLoadBalancingAlgorithm; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +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 + */ + /** + * Sample code: ScalingPlanPooledSchedules_Create. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPooledSchedulesCreate( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPooledSchedules() + .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)) + .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampUpMinimumHostsPct(20) + .withRampUpCapacityThresholdPct(80) + .withPeakStartTime(new Time().withHour(8).withMinute(0)) + .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) + .withRampDownStartTime(new Time().withHour(18).withMinute(0)) + .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownMinimumHostsPct(20) + .withRampDownCapacityThresholdPct(50) + .withRampDownForceLogoffUsers(true) + .withRampDownWaitTimeMinutes(30) + .withRampDownNotificationMessage("message") + .withOffPeakStartTime(new Time().withHour(20).withMinute(0)) + .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .create(); + } +} 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/ScalingPlanPooledSchedulesDeleteSamples.java similarity index 51% rename from sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceSamples.java rename to sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java index d54a4ac046859..4088621777671 100644 --- 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/ScalingPlanPooledSchedulesDeleteSamples.java @@ -6,18 +6,20 @@ import com.azure.core.util.Context; -/** Samples for PrivateLinkResources ListByWorkspace. */ -public final class PrivateLinkResourcesListByWorkspaceSamples { +/** Samples for ScalingPlanPooledSchedules Delete. */ +public final class ScalingPlanPooledSchedulesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateLinkResources_ListByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_Delete.json */ /** - * Sample code: PrivateLinkResources_ListByWorkspace. + * Sample code: ScalingPlanPooledSchedules_Delete. * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void privateLinkResourcesListByWorkspace( + public static void scalingPlanPooledSchedulesDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.privateLinkResources().listByWorkspace("resourceGroup1", "workspace1", Context.NONE); + manager + .scalingPlanPooledSchedules() + .deleteWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", 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/ScalingPlanPooledSchedulesGetSamples.java similarity index 52% rename from sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolSamples.java rename to sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java index 306a7c2ed5ca7..807132902b9ee 100644 --- 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/ScalingPlanPooledSchedulesGetSamples.java @@ -6,18 +6,20 @@ import com.azure.core.util.Context; -/** Samples for PrivateEndpointConnections ListByHostPool. */ -public final class PrivateEndpointConnectionsListByHostPoolSamples { +/** Samples for ScalingPlanPooledSchedules Get. */ +public final class ScalingPlanPooledSchedulesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateEndpointConnection_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_Get.json */ /** - * Sample code: PrivateEndpointConnection_ListByHostPool. + * Sample code: ScalingPlanPooledSchedules_Get. * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void privateEndpointConnectionListByHostPool( + public static void scalingPlanPooledSchedulesGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.privateEndpointConnections().listByHostPool("resourceGroup1", "hostPool1", Context.NONE); + manager + .scalingPlanPooledSchedules() + .getWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", 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/ScalingPlanPooledSchedulesListSamples.java similarity index 53% rename from sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolSamples.java rename to sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java index 32f1999f48415..808a5cd767456 100644 --- 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/ScalingPlanPooledSchedulesListSamples.java @@ -6,18 +6,18 @@ import com.azure.core.util.Context; -/** Samples for PrivateLinkResources ListByHostPool. */ -public final class PrivateLinkResourcesListByHostPoolSamples { +/** Samples for ScalingPlanPooledSchedules List. */ +public final class ScalingPlanPooledSchedulesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/PrivateLinkResources_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlanPooledSchedule_List.json */ /** - * Sample code: PrivateLinkResources_ListByHostPool. + * Sample code: ScalingPlanPooledSchedules_List. * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void privateLinkResourcesListByHostPool( + public static void scalingPlanPooledSchedulesList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.privateLinkResources().listByHostPool("resourceGroup1", "hostPool1", Context.NONE); + manager.scalingPlanPooledSchedules().list("resourceGroup1", "scalingPlan1", 10, true, 0, Context.NONE); } } 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 new file mode 100644 index 0000000000000..92c72cc5930b9 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java @@ -0,0 +1,45 @@ +// 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.Context; +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.Time; +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 + */ + /** + * Sample code: ScalingPlanPooledSchedules_Update. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPooledSchedulesUpdate( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + ScalingPlanPooledSchedule resource = + manager + .scalingPlanPooledSchedules() + .getWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", Context.NONE) + .getValue(); + resource + .update() + .withDaysOfWeek( + Arrays + .asList( + DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY)) + .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampUpCapacityThresholdPct(80) + .withPeakStartTime(new Time().withHour(8).withMinute(0)) + .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) + .withRampDownMinimumHostsPct(20) + .withRampDownWaitTimeMinutes(30) + .apply(); + } +} 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 b684adc7fbdf4..874de8aea6cfd 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/preview/2021-09-03-preview/examples/ScalingPlan_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_Create.json */ /** * Sample code: ScalingPlans_Create. @@ -31,10 +31,10 @@ public static void scalingPlansCreate( .define("scalingPlan1") .withRegion("centralus") .withExistingResourceGroup("resourceGroup1") + .withTimeZone("Central Standard Time") .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("Description of Scaling Plan") .withFriendlyName("Scaling Plan 1") - .withTimeZone("Central Standard Time") .withHostPoolType(ScalingHostPoolType.POOLED) .withExclusionTag("value") .withSchedules( 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 7164432cfea48..3b50990ca5a27 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 @@ -9,7 +9,7 @@ /** Samples for ScalingPlans Delete. */ public final class ScalingPlansDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_Delete.json */ /** * Sample code: ScalingPlans_Delete. @@ -18,6 +18,6 @@ public final class ScalingPlansDeleteSamples { */ public static void scalingPlansDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().deleteWithResponse("resourceGroup1", "scalingPlan1", Context.NONE); + manager.scalingPlans().deleteByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", Context.NONE); } } 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 915699341a745..ba2c2d0df7d51 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 @@ -9,7 +9,7 @@ /** Samples for ScalingPlans GetByResourceGroup. */ public final class ScalingPlansGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 5e122b48892c3..c30ca2eee0984 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 @@ -9,7 +9,7 @@ /** Samples for ScalingPlans ListByHostPool. */ public final class ScalingPlansListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_ListByHostPool.json */ /** * Sample code: ScalingPlan_ListByHostPool. @@ -18,6 +18,6 @@ public final class ScalingPlansListByHostPoolSamples { */ public static void scalingPlanListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().listByHostPool("resourceGroup1", "hostPool1", Context.NONE); + manager.scalingPlans().listByHostPool("resourceGroup1", "hostPool1", 10, true, 0, Context.NONE); } } 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 57249b0d430df..bee588818af2f 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 @@ -9,7 +9,7 @@ /** Samples for ScalingPlans ListByResourceGroup. */ public final class ScalingPlansListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_ListByResourceGroup.json */ /** * Sample code: ScalingPlans_ListByResourceGroup. @@ -18,6 +18,6 @@ public final class ScalingPlansListByResourceGroupSamples { */ public static void scalingPlansListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().listByResourceGroup("resourceGroup1", Context.NONE); + manager.scalingPlans().listByResourceGroup("resourceGroup1", 10, true, 0, Context.NONE); } } 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 0a7d8c6a2fb6a..d0f8e6336402c 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 @@ -9,7 +9,7 @@ /** Samples for ScalingPlans List. */ public final class ScalingPlansListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/ScalingPlan_ListBySubscription.json */ /** * Sample code: ScalingPlans_ListBySubscription. @@ -18,6 +18,6 @@ public final class ScalingPlansListSamples { */ public static void scalingPlansListBySubscription( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().list(Context.NONE); + manager.scalingPlans().list(10, true, 0, Context.NONE); } } 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 c43ea38f28a32..a869d70c4d70e 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 @@ -10,7 +10,7 @@ /** Samples for ScalingPlans Update. */ public final class ScalingPlansUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 7310c89fbddc8..0fe170efb0370 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 @@ -9,7 +9,7 @@ /** Samples for SessionHosts Delete. */ public final class SessionHostsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 fa9d06eb747b3..ac4c258dc620b 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 @@ -9,7 +9,7 @@ /** Samples for SessionHosts Get. */ public final class SessionHostsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 de47b5089a658..0b567cc574a77 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 @@ -9,7 +9,7 @@ /** Samples for SessionHosts List. */ public final class SessionHostsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/SessionHost_List.json */ /** * Sample code: SessionHost_List. @@ -18,6 +18,6 @@ public final class SessionHostsListSamples { */ public static void sessionHostList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.sessionHosts().list("resourceGroup1", "hostPool1", Context.NONE); + manager.sessionHosts().list("resourceGroup1", "hostPool1", 10, true, 0, Context.NONE); } } 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 d1fd474e00a18..434f1bb628cdc 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 @@ -10,7 +10,7 @@ /** Samples for SessionHosts Update. */ public final class SessionHostsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/SessionHost_Update.json */ /** * Sample code: SessionHost_Update. @@ -26,7 +26,10 @@ public static void sessionHostUpdate( "hostPool1", "sessionHost1.microsoft.com", true, - new SessionHostPatch().withAllowNewSession(true).withAssignedUser("user1@microsoft.com"), + new SessionHostPatch() + .withAllowNewSession(true) + .withAssignedUser("user1@microsoft.com") + .withFriendlyName("friendly"), Context.NONE); } } 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 997d0140aa13f..6ad3f81e21447 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 @@ -9,7 +9,7 @@ /** Samples for StartMenuItems List. */ public final class StartMenuItemsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/StartMenuItem_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/StartMenuItem_List.json */ /** * Sample code: StartMenuItem_List. @@ -18,6 +18,6 @@ public final class StartMenuItemsListSamples { */ public static void startMenuItemList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.startMenuItems().list("resourceGroup1", "applicationGroup1", Context.NONE); + manager.startMenuItems().list("resourceGroup1", "applicationGroup1", null, null, null, Context.NONE); } } 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 5d847efdc149c..0024bffc81012 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 @@ -9,7 +9,7 @@ /** Samples for UserSessions Delete. */ public final class UserSessionsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 1bc422d2ee966..2b61f8167b182 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 @@ -9,7 +9,7 @@ /** Samples for UserSessions Disconnect. */ public final class UserSessionsDisconnectSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_Disconnect_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 0fa3fb965e88e..aaeb6cf499db4 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 @@ -9,7 +9,7 @@ /** Samples for UserSessions Get. */ public final class UserSessionsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 85cdb28930917..4441d6cdb3d79 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 @@ -9,7 +9,7 @@ /** Samples for UserSessions ListByHostPool. */ public final class UserSessionsListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_ListByHostPool.json */ /** * Sample code: UserSession_ListByHostPool. @@ -24,6 +24,9 @@ public static void userSessionListByHostPool( "resourceGroup1", "hostPool1", "userPrincipalName eq 'user1@microsoft.com' and state eq 'active'", + 10, + true, + 0, Context.NONE); } } 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 f6fc11a416ed7..3e89ba1e9cfda 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 @@ -9,7 +9,7 @@ /** Samples for UserSessions List. */ public final class UserSessionsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/UserSession_List.json */ /** * Sample code: UserSession_List. @@ -18,6 +18,8 @@ public final class UserSessionsListSamples { */ public static void userSessionList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.userSessions().list("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", Context.NONE); + manager + .userSessions() + .list("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", 10, true, 0, Context.NONE); } } 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 5c02f0c8a62d8..bc2c16d7e936b 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 @@ -10,7 +10,7 @@ /** Samples for UserSessions SendMessage. */ public final class UserSessionsSendMessageSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_SendMessage_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 9614c24a98c49..1c396aa30454e 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/preview/2021-09-03-preview/examples/Workspace_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Create.json */ /** * Sample code: Workspace_Create. 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 f654313f0379b..8697201fae5b5 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces Delete. */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Delete.json */ /** * Sample code: Workspace_Delete. @@ -18,6 +18,6 @@ public final class WorkspacesDeleteSamples { */ public static void workspaceDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.workspaces().deleteWithResponse("resourceGroup1", "workspace1", Context.NONE); + manager.workspaces().deleteByResourceGroupWithResponse("resourceGroup1", "workspace1", Context.NONE); } } 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 32aa24ea989a3..f616df107fb1f 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces GetByResourceGroup. */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 b5930e1e766ee..c25fa7fe4d7ff 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces ListByResourceGroup. */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_ListByResourceGroup.json */ /** * Sample code: Workspace_ListByResourceGroup. @@ -18,6 +18,6 @@ public final class WorkspacesListByResourceGroupSamples { */ public static void workspaceListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.workspaces().listByResourceGroup("resourceGroup1", Context.NONE); + manager.workspaces().listByResourceGroup("resourceGroup1", 10, true, 0, Context.NONE); } } 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 640a1e9a182ab..e8d20180a5b9f 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 @@ -9,7 +9,7 @@ /** Samples for Workspaces List. */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/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 8e5f62b5b05f2..91404bf92ed51 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.desktopvirtualization.generated; import com.azure.core.util.Context; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.Workspace; import java.util.HashMap; import java.util.Map; @@ -13,7 +12,7 @@ /** Samples for Workspaces Update. */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2022-09-09/examples/Workspace_Update.json */ /** * Sample code: Workspace_Update. @@ -32,7 +31,6 @@ public static void workspaceUpdate( .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) .apply(); }