diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md index f49ea63707c5..39b18220eb79 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 (2023-01-11) + +- Azure Resource Manager DesktopVirtualization client library for Java. This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. Package tag package-preview-2022-10. 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 717b4fc2ac12..8c2635f2d105 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-preview-2022-10. 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}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md index 8dfa5e819280..3f369f37289c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md @@ -66,6 +66,14 @@ - [ListByHostPool](#privatelinkresources_listbyhostpool) - [ListByWorkspace](#privatelinkresources_listbyworkspace) +## ScalingPlanPooledSchedules + +- [Create](#scalingplanpooledschedules_create) +- [Delete](#scalingplanpooledschedules_delete) +- [Get](#scalingplanpooledschedules_get) +- [List](#scalingplanpooledschedules_list) +- [Update](#scalingplanpooledschedules_update) + ## ScalingPlans - [Create](#scalingplans_create) @@ -108,15 +116,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/preview/2022-10-14-preview/examples/ApplicationGroup_Create.json */ /** * Sample code: ApplicationGroup_Create. @@ -136,11 +142,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(); } @@ -160,12 +161,10 @@ public final class ApplicationGroupsCreateOrUpdateSamples { ### ApplicationGroups_Delete ```java -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/preview/2022-10-14-preview/examples/ApplicationGroup_Delete.json */ /** * Sample code: ApplicationGroup_Delete. @@ -174,7 +173,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", com.azure.core.util.Context.NONE); } } ``` @@ -182,12 +183,10 @@ public final class ApplicationGroupsDeleteSamples { ### ApplicationGroups_GetByResourceGroup ```java -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/preview/2022-10-14-preview/examples/ApplicationGroup_Get.json */ /** * Sample code: ApplicationGroup_Get. @@ -196,7 +195,9 @@ public final class ApplicationGroupsGetByResourceGroupSamples { */ public static void applicationGroupGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applicationGroups().getByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", Context.NONE); + manager + .applicationGroups() + .getByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", com.azure.core.util.Context.NONE); } } ``` @@ -204,12 +205,10 @@ public final class ApplicationGroupsGetByResourceGroupSamples { ### ApplicationGroups_List ```java -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/preview/2022-10-14-preview/examples/ApplicationGroup_ListBySubscription.json */ /** * Sample code: ApplicationGroup_List. @@ -218,7 +217,7 @@ public final class ApplicationGroupsListSamples { */ public static void applicationGroupList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applicationGroups().list("applicationGroupType eq 'RailApplication'", Context.NONE); + manager.applicationGroups().list("applicationGroupType eq 'RailApplication'", com.azure.core.util.Context.NONE); } } ``` @@ -226,12 +225,10 @@ public final class ApplicationGroupsListSamples { ### ApplicationGroups_ListByResourceGroup ```java -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/preview/2022-10-14-preview/examples/ApplicationGroup_ListByResourceGroup.json */ /** * Sample code: ApplicationGroup_ListByResourceGroup. @@ -242,7 +239,13 @@ 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, + com.azure.core.util.Context.NONE); } } ``` @@ -250,7 +253,6 @@ public final class ApplicationGroupsListByResourceGroupSamples { ### ApplicationGroups_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroup; import java.util.HashMap; import java.util.Map; @@ -258,7 +260,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/preview/2022-10-14-preview/examples/ApplicationGroup_Update.json */ /** * Sample code: ApplicationGroups_Update. @@ -270,7 +272,7 @@ public final class ApplicationGroupsUpdateSamples { ApplicationGroup resource = manager .applicationGroups() - .getByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", Context.NONE) + .getByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -301,7 +303,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/preview/2022-10-14-preview/examples/Application_Create.json */ /** * Sample code: Application_Create. @@ -330,12 +332,10 @@ public final class ApplicationsCreateOrUpdateSamples { ### Applications_Delete ```java -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/preview/2022-10-14-preview/examples/Application_Delete.json */ /** * Sample code: Application_Delete. @@ -344,7 +344,10 @@ public final class ApplicationsDeleteSamples { */ public static void applicationDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applications().deleteWithResponse("resourceGroup1", "applicationGroup1", "application1", Context.NONE); + manager + .applications() + .deleteWithResponse( + "resourceGroup1", "applicationGroup1", "application1", com.azure.core.util.Context.NONE); } } ``` @@ -352,12 +355,10 @@ public final class ApplicationsDeleteSamples { ### Applications_Get ```java -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/preview/2022-10-14-preview/examples/Application_Get.json */ /** * Sample code: Application_Get. @@ -366,7 +367,9 @@ public final class ApplicationsGetSamples { */ public static void applicationGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applications().getWithResponse("resourceGroup1", "applicationGroup1", "application1", Context.NONE); + manager + .applications() + .getWithResponse("resourceGroup1", "applicationGroup1", "application1", com.azure.core.util.Context.NONE); } } ``` @@ -374,12 +377,10 @@ public final class ApplicationsGetSamples { ### Applications_List ```java -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/preview/2022-10-14-preview/examples/Application_List.json */ /** * Sample code: Applications_List. @@ -388,7 +389,9 @@ 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, com.azure.core.util.Context.NONE); } } ``` @@ -396,7 +399,6 @@ public final class ApplicationsListSamples { ### Applications_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.models.Application; import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; @@ -404,7 +406,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/preview/2022-10-14-preview/examples/Application_Update.json */ /** * Sample code: Application_Update. @@ -416,7 +418,8 @@ public final class ApplicationsUpdateSamples { Application resource = manager .applications() - .getWithResponse("resourceGroup1", "applicationGroup1", "application1", Context.NONE) + .getWithResponse( + "resourceGroup1", "applicationGroup1", "application1", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -437,12 +440,10 @@ public final class ApplicationsUpdateSamples { ### Desktops_Get ```java -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/preview/2022-10-14-preview/examples/Desktop_Get.json */ /** * Sample code: Desktop_Get. @@ -451,7 +452,9 @@ public final class DesktopsGetSamples { */ public static void desktopGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.desktops().getWithResponse("resourceGroup1", "applicationGroup1", "SessionDesktop", Context.NONE); + manager + .desktops() + .getWithResponse("resourceGroup1", "applicationGroup1", "SessionDesktop", com.azure.core.util.Context.NONE); } } ``` @@ -459,12 +462,10 @@ public final class DesktopsGetSamples { ### Desktops_List ```java -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/preview/2022-10-14-preview/examples/Desktop_List.json */ /** * Sample code: Desktop_List. @@ -473,7 +474,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, com.azure.core.util.Context.NONE); } } ``` @@ -481,13 +482,12 @@ public final class DesktopsListSamples { ### Desktops_Update ```java -import com.azure.core.util.Context; 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/preview/2022-10-14-preview/examples/Desktop_Update.json */ /** * Sample code: Desktop_Update. @@ -503,7 +503,7 @@ public final class DesktopsUpdateSamples { "applicationGroup1", "SessionDesktop", new DesktopPatch().withDescription("des1").withFriendlyName("friendly"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -512,23 +512,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/preview/2022-10-14-preview/examples/HostPool_Create.json */ /** * Sample code: HostPool_Create. @@ -560,12 +562,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(); } @@ -585,12 +591,10 @@ public final class HostPoolsCreateOrUpdateSamples { ### HostPools_Delete ```java -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/preview/2022-10-14-preview/examples/HostPool_Delete.json */ /** * Sample code: HostPool_Delete. @@ -599,7 +603,7 @@ public final class HostPoolsDeleteSamples { */ public static void hostPoolDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.hostPools().deleteWithResponse("resourceGroup1", "hostPool1", true, Context.NONE); + manager.hostPools().deleteWithResponse("resourceGroup1", "hostPool1", true, com.azure.core.util.Context.NONE); } } ``` @@ -607,12 +611,10 @@ public final class HostPoolsDeleteSamples { ### HostPools_GetByResourceGroup ```java -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/preview/2022-10-14-preview/examples/HostPool_Get.json */ /** * Sample code: HostPool_Get. @@ -621,7 +623,9 @@ public final class HostPoolsGetByResourceGroupSamples { */ public static void hostPoolGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.hostPools().getByResourceGroupWithResponse("resourceGroup1", "hostPool1", Context.NONE); + manager + .hostPools() + .getByResourceGroupWithResponse("resourceGroup1", "hostPool1", com.azure.core.util.Context.NONE); } } ``` @@ -629,12 +633,10 @@ public final class HostPoolsGetByResourceGroupSamples { ### HostPools_List ```java -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/preview/2022-10-14-preview/examples/HostPool_List.json */ /** * Sample code: HostPool_List. @@ -643,7 +645,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, com.azure.core.util.Context.NONE); } } ``` @@ -651,12 +653,10 @@ public final class HostPoolsListSamples { ### HostPools_ListByResourceGroup ```java -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/preview/2022-10-14-preview/examples/HostPool_ListByResourceGroup.json */ /** * Sample code: HostPool_ListByResourceGroup. @@ -665,7 +665,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, com.azure.core.util.Context.NONE); } } ``` @@ -673,12 +673,10 @@ public final class HostPoolsListByResourceGroupSamples { ### HostPools_RetrieveRegistrationToken ```java -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/preview/2022-10-14-preview/examples/HostPools_RetrieveRegistrationToken_Post.json */ /** * Sample code: HostPools_RetrieveRegistrationToken_Post. @@ -687,7 +685,9 @@ public final class HostPoolsRetrieveRegistrationTokenSamples { */ public static void hostPoolsRetrieveRegistrationTokenPost( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.hostPools().retrieveRegistrationTokenWithResponse("resourceGroup1", "hostPool1", Context.NONE); + manager + .hostPools() + .retrieveRegistrationTokenWithResponse("resourceGroup1", "hostPool1", com.azure.core.util.Context.NONE); } } ``` @@ -695,22 +695,25 @@ public final class HostPoolsRetrieveRegistrationTokenSamples { ### HostPools_Update ```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/preview/2022-10-14-preview/examples/HostPool_Update.json */ /** * Sample code: HostPool_Update. @@ -720,7 +723,10 @@ public final class HostPoolsUpdateSamples { public static void hostPoolUpdate( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { HostPool resource = - manager.hostPools().getByResourceGroupWithResponse("resourceGroup1", "hostPool1", Context.NONE).getValue(); + manager + .hostPools() + .getByResourceGroupWithResponse("resourceGroup1", "hostPool1", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withTags(mapOf("tag1", "value1", "tag2", "value2")) @@ -739,7 +745,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(); } @@ -759,13 +774,12 @@ public final class HostPoolsUpdateSamples { ### MsixImages_Expand ```java -import com.azure.core.util.Context; 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/preview/2022-10-14-preview/examples/MsixImage_Expand_Post.json */ /** * Sample code: MsixImage_Expand. @@ -776,7 +790,11 @@ public final class MsixImagesExpandSamples { com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .msixImages() - .expand("resourceGroup1", "hostpool1", new MsixImageUri().withUri("imagepath"), Context.NONE); + .expand( + "resourceGroup1", + "hostpool1", + new MsixImageUri().withUri("imagepath"), + com.azure.core.util.Context.NONE); } } ``` @@ -792,7 +810,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/preview/2022-10-14-preview/examples/MsixPackage_Create.json */ /** * Sample code: MSIXPackage_Create. @@ -840,12 +858,10 @@ public final class MsixPackagesCreateOrUpdateSamples { ### MsixPackages_Delete ```java -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/preview/2022-10-14-preview/examples/MsixPackage_Delete.json */ /** * Sample code: MSIXPackage_Delete. @@ -854,7 +870,9 @@ public final class MsixPackagesDeleteSamples { */ public static void mSIXPackageDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.msixPackages().deleteWithResponse("resourceGroup1", "hostpool1", "packagefullname", Context.NONE); + manager + .msixPackages() + .deleteWithResponse("resourceGroup1", "hostpool1", "packagefullname", com.azure.core.util.Context.NONE); } } ``` @@ -862,12 +880,10 @@ public final class MsixPackagesDeleteSamples { ### MsixPackages_Get ```java -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/preview/2022-10-14-preview/examples/MsixPackage_Get.json */ /** * Sample code: MSIXPackage_Get. @@ -876,7 +892,9 @@ public final class MsixPackagesGetSamples { */ public static void mSIXPackageGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.msixPackages().getWithResponse("resourceGroup1", "hostpool1", "packagefullname", Context.NONE); + manager + .msixPackages() + .getWithResponse("resourceGroup1", "hostpool1", "packagefullname", com.azure.core.util.Context.NONE); } } ``` @@ -884,12 +902,10 @@ public final class MsixPackagesGetSamples { ### MsixPackages_List ```java -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/preview/2022-10-14-preview/examples/MsixPackage_List.json */ /** * Sample code: MSIXPackage_List. @@ -898,7 +914,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, com.azure.core.util.Context.NONE); } } ``` @@ -906,13 +922,12 @@ public final class MsixPackagesListSamples { ### MsixPackages_Update ```java -import com.azure.core.util.Context; 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/preview/2022-10-14-preview/examples/MsixPackage_Update.json */ /** * Sample code: MSIXPackage_Update. @@ -924,7 +939,7 @@ public final class MsixPackagesUpdateSamples { MsixPackage resource = manager .msixPackages() - .getWithResponse("resourceGroup1", "hostpool1", "msixpackagefullname", Context.NONE) + .getWithResponse("resourceGroup1", "hostpool1", "msixpackagefullname", com.azure.core.util.Context.NONE) .getValue(); resource.update().withIsActive(true).withIsRegularRegistration(false).withDisplayName("displayname").apply(); } @@ -934,12 +949,10 @@ public final class MsixPackagesUpdateSamples { ### Operations_List ```java -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/preview/2022-10-14-preview/examples/OperationDescription_List.json */ /** * Sample code: OperationDescription_List. @@ -948,7 +961,7 @@ public final class OperationsListSamples { */ public static void operationDescriptionList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` @@ -956,12 +969,10 @@ 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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_DeleteByHostPool.json */ /** * Sample code: PrivateEndpointConnection_DeleteByHostPool. @@ -973,7 +984,10 @@ public final class PrivateEndpointConnectionsDeleteByHostPoolSamples { manager .privateEndpointConnections() .deleteByHostPoolWithResponse( - "resourceGroup1", "hostPool1", "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", Context.NONE); + "resourceGroup1", + "hostPool1", + "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); } } ``` @@ -981,12 +995,10 @@ public final class PrivateEndpointConnectionsDeleteByHostPoolSamples { ### 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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_DeleteByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_DeleteByWorkspace. @@ -998,7 +1010,10 @@ public final class PrivateEndpointConnectionsDeleteByWorkspaceSamples { manager .privateEndpointConnections() .deleteByWorkspaceWithResponse( - "resourceGroup1", "workspace1", "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", Context.NONE); + "resourceGroup1", + "workspace1", + "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); } } ``` @@ -1006,12 +1021,10 @@ public final class PrivateEndpointConnectionsDeleteByWorkspaceSamples { ### 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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_GetByHostPool.json */ /** * Sample code: PrivateEndpointConnection_GetByHostPool. @@ -1023,7 +1036,10 @@ public final class PrivateEndpointConnectionsGetByHostPoolSamples { manager .privateEndpointConnections() .getByHostPoolWithResponse( - "resourceGroup1", "hostPool1", "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", Context.NONE); + "resourceGroup1", + "hostPool1", + "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); } } ``` @@ -1031,12 +1047,10 @@ public final class PrivateEndpointConnectionsGetByHostPoolSamples { ### PrivateEndpointConnections_GetByWorkspace ```java -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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_GetByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_GetByWorkspace. @@ -1048,7 +1062,10 @@ public final class PrivateEndpointConnectionsGetByWorkspaceSamples { manager .privateEndpointConnections() .getByWorkspaceWithResponse( - "resourceGroup1", "workspace1", "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", Context.NONE); + "resourceGroup1", + "workspace1", + "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); } } ``` @@ -1056,12 +1073,10 @@ public final class PrivateEndpointConnectionsGetByWorkspaceSamples { ### 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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_ListByHostPool.json */ /** * Sample code: PrivateEndpointConnection_ListByHostPool. @@ -1070,7 +1085,9 @@ public final class PrivateEndpointConnectionsListByHostPoolSamples { */ public static void privateEndpointConnectionListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.privateEndpointConnections().listByHostPool("resourceGroup1", "hostPool1", Context.NONE); + manager + .privateEndpointConnections() + .listByHostPool("resourceGroup1", "hostPool1", null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1078,12 +1095,10 @@ public final class PrivateEndpointConnectionsListByHostPoolSamples { ### 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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_ListByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_ListByWorkspace. @@ -1092,7 +1107,9 @@ public final class PrivateEndpointConnectionsListByWorkspaceSamples { */ public static void privateEndpointConnectionListByWorkspace( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.privateEndpointConnections().listByWorkspace("resourceGroup1", "workspace1", Context.NONE); + manager + .privateEndpointConnections() + .listByWorkspace("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE); } } ``` @@ -1100,7 +1117,6 @@ public final class PrivateEndpointConnectionsListByWorkspaceSamples { ### PrivateEndpointConnections_UpdateByHostPool ```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; @@ -1108,7 +1124,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkService /** 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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_UpdateByHostPool.json */ /** * Sample code: PrivateEndpointConnection_UpdateByHostPool. @@ -1129,7 +1145,7 @@ public final class PrivateEndpointConnectionsUpdateByHostPoolSamples { .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) .withDescription("Approved by admin@consoto.com") .withActionsRequired("None")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1137,7 +1153,6 @@ public final class PrivateEndpointConnectionsUpdateByHostPoolSamples { ### PrivateEndpointConnections_UpdateByWorkspace ```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; @@ -1145,7 +1160,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkService /** 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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_UpdateByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_UpdateByWorkspace. @@ -1166,7 +1181,7 @@ public final class PrivateEndpointConnectionsUpdateByWorkspaceSamples { .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) .withDescription("Approved by admin@consoto.com") .withActionsRequired("None")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1174,12 +1189,10 @@ public final class PrivateEndpointConnectionsUpdateByWorkspaceSamples { ### PrivateLinkResources_ListByHostPool ```java -import com.azure.core.util.Context; - /** Samples for PrivateLinkResources ListByHostPool. */ public final class PrivateLinkResourcesListByHostPoolSamples { /* - * 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/preview/2022-10-14-preview/examples/PrivateLinkResources_ListByHostPool.json */ /** * Sample code: PrivateLinkResources_ListByHostPool. @@ -1188,7 +1201,9 @@ public final class PrivateLinkResourcesListByHostPoolSamples { */ public static void privateLinkResourcesListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.privateLinkResources().listByHostPool("resourceGroup1", "hostPool1", Context.NONE); + manager + .privateLinkResources() + .listByHostPool("resourceGroup1", "hostPool1", null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1196,12 +1211,10 @@ public final class PrivateLinkResourcesListByHostPoolSamples { ### PrivateLinkResources_ListByWorkspace ```java -import com.azure.core.util.Context; - /** Samples for PrivateLinkResources ListByWorkspace. */ public final class PrivateLinkResourcesListByWorkspaceSamples { /* - * 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/preview/2022-10-14-preview/examples/PrivateLinkResources_ListByWorkspace.json */ /** * Sample code: PrivateLinkResources_ListByWorkspace. @@ -1210,7 +1223,169 @@ public final class PrivateLinkResourcesListByWorkspaceSamples { */ public static void privateLinkResourcesListByWorkspace( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.privateLinkResources().listByWorkspace("resourceGroup1", "workspace1", Context.NONE); + manager + .privateLinkResources() + .listByWorkspace("resourceGroup1", "workspace1", null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### ScalingPlanPooledSchedules_Create + +```java +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/preview/2022-10-14-preview/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(); + } +} +``` + +### ScalingPlanPooledSchedules_Delete + +```java +/** Samples for ScalingPlanPooledSchedules Delete. */ +public final class ScalingPlanPooledSchedulesDeleteSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlanPooledSchedule_Delete.json + */ + /** + * Sample code: ScalingPlanPooledSchedules_Delete. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPooledSchedulesDelete( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPooledSchedules() + .deleteWithResponse( + "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE); + } +} +``` + +### ScalingPlanPooledSchedules_Get + +```java +/** Samples for ScalingPlanPooledSchedules Get. */ +public final class ScalingPlanPooledSchedulesGetSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlanPooledSchedule_Get.json + */ + /** + * Sample code: ScalingPlanPooledSchedules_Get. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPooledSchedulesGet( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPooledSchedules() + .getWithResponse( + "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE); + } +} +``` + +### ScalingPlanPooledSchedules_List + +```java +/** Samples for ScalingPlanPooledSchedules List. */ +public final class ScalingPlanPooledSchedulesListSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlanPooledSchedule_List.json + */ + /** + * Sample code: ScalingPlanPooledSchedules_List. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPooledSchedulesList( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPooledSchedules() + .list("resourceGroup1", "scalingPlan1", 10, true, 0, com.azure.core.util.Context.NONE); + } +} +``` + +### ScalingPlanPooledSchedules_Update + +```java +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/preview/2022-10-14-preview/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", com.azure.core.util.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 +1406,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/preview/2022-10-14-preview/examples/ScalingPlan_Create.json */ /** * Sample code: ScalingPlans_Create. @@ -1245,10 +1420,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( @@ -1305,12 +1480,10 @@ public final class ScalingPlansCreateSamples { ### ScalingPlans_Delete ```java -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/preview/2022-10-14-preview/examples/ScalingPlan_Delete.json */ /** * Sample code: ScalingPlans_Delete. @@ -1319,7 +1492,9 @@ 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", com.azure.core.util.Context.NONE); } } ``` @@ -1327,12 +1502,10 @@ public final class ScalingPlansDeleteSamples { ### ScalingPlans_GetByResourceGroup ```java -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/preview/2022-10-14-preview/examples/ScalingPlan_Get.json */ /** * Sample code: ScalingPlans_Get. @@ -1341,7 +1514,9 @@ public final class ScalingPlansGetByResourceGroupSamples { */ public static void scalingPlansGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().getByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", Context.NONE); + manager + .scalingPlans() + .getByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", com.azure.core.util.Context.NONE); } } ``` @@ -1349,12 +1524,10 @@ public final class ScalingPlansGetByResourceGroupSamples { ### ScalingPlans_List ```java -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/preview/2022-10-14-preview/examples/ScalingPlan_ListBySubscription.json */ /** * Sample code: ScalingPlans_ListBySubscription. @@ -1363,7 +1536,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, com.azure.core.util.Context.NONE); } } ``` @@ -1371,12 +1544,10 @@ public final class ScalingPlansListSamples { ### ScalingPlans_ListByHostPool ```java -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/preview/2022-10-14-preview/examples/ScalingPlan_ListByHostPool.json */ /** * Sample code: ScalingPlan_ListByHostPool. @@ -1385,7 +1556,9 @@ 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, com.azure.core.util.Context.NONE); } } ``` @@ -1393,12 +1566,10 @@ public final class ScalingPlansListByHostPoolSamples { ### ScalingPlans_ListByResourceGroup ```java -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/preview/2022-10-14-preview/examples/ScalingPlan_ListByResourceGroup.json */ /** * Sample code: ScalingPlans_ListByResourceGroup. @@ -1407,7 +1578,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, com.azure.core.util.Context.NONE); } } ``` @@ -1415,13 +1586,12 @@ public final class ScalingPlansListByResourceGroupSamples { ### ScalingPlans_Update ```java -import com.azure.core.util.Context; 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/preview/2022-10-14-preview/examples/ScalingPlan_Update.json */ /** * Sample code: ScalingPlans_Update. @@ -1433,7 +1603,7 @@ public final class ScalingPlansUpdateSamples { ScalingPlan resource = manager .scalingPlans() - .getByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", Context.NONE) + .getByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", com.azure.core.util.Context.NONE) .getValue(); resource.update().apply(); } @@ -1443,12 +1613,10 @@ public final class ScalingPlansUpdateSamples { ### SessionHosts_Delete ```java -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/preview/2022-10-14-preview/examples/SessionHost_Delete.json */ /** * Sample code: SessionHost_Delete. @@ -1459,7 +1627,8 @@ public final class SessionHostsDeleteSamples { com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .sessionHosts() - .deleteWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", true, Context.NONE); + .deleteWithResponse( + "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", true, com.azure.core.util.Context.NONE); } } ``` @@ -1467,12 +1636,10 @@ public final class SessionHostsDeleteSamples { ### SessionHosts_Get ```java -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/preview/2022-10-14-preview/examples/SessionHost_Get.json */ /** * Sample code: SessionHost_Get. @@ -1483,7 +1650,8 @@ public final class SessionHostsGetSamples { com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .sessionHosts() - .getWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", Context.NONE); + .getWithResponse( + "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", com.azure.core.util.Context.NONE); } } ``` @@ -1491,12 +1659,10 @@ public final class SessionHostsGetSamples { ### SessionHosts_List ```java -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/preview/2022-10-14-preview/examples/SessionHost_List.json */ /** * Sample code: SessionHost_List. @@ -1505,7 +1671,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, com.azure.core.util.Context.NONE); } } ``` @@ -1513,13 +1679,12 @@ public final class SessionHostsListSamples { ### SessionHosts_Update ```java -import com.azure.core.util.Context; 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/preview/2022-10-14-preview/examples/SessionHost_Update.json */ /** * Sample code: SessionHost_Update. @@ -1535,8 +1700,11 @@ public final class SessionHostsUpdateSamples { "hostPool1", "sessionHost1.microsoft.com", true, - new SessionHostPatch().withAllowNewSession(true).withAssignedUser("user1@microsoft.com"), - Context.NONE); + new SessionHostPatch() + .withAllowNewSession(true) + .withAssignedUser("user1@microsoft.com") + .withFriendlyName("friendly"), + com.azure.core.util.Context.NONE); } } ``` @@ -1544,12 +1712,10 @@ public final class SessionHostsUpdateSamples { ### StartMenuItems_List ```java -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/preview/2022-10-14-preview/examples/StartMenuItem_List.json */ /** * Sample code: StartMenuItem_List. @@ -1558,7 +1724,9 @@ 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, com.azure.core.util.Context.NONE); } } ``` @@ -1566,12 +1734,10 @@ public final class StartMenuItemsListSamples { ### UserSessions_Delete ```java -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/preview/2022-10-14-preview/examples/UserSession_Delete.json */ /** * Sample code: UserSession_Delete. @@ -1582,7 +1748,13 @@ public final class UserSessionsDeleteSamples { com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .userSessions() - .deleteWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", true, Context.NONE); + .deleteWithResponse( + "resourceGroup1", + "hostPool1", + "sessionHost1.microsoft.com", + "1", + true, + com.azure.core.util.Context.NONE); } } ``` @@ -1590,12 +1762,10 @@ public final class UserSessionsDeleteSamples { ### UserSessions_Disconnect ```java -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/preview/2022-10-14-preview/examples/UserSession_Disconnect_Post.json */ /** * Sample code: UserSession_Disconnect_Post. @@ -1606,7 +1776,8 @@ public final class UserSessionsDisconnectSamples { com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .userSessions() - .disconnectWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", Context.NONE); + .disconnectWithResponse( + "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", com.azure.core.util.Context.NONE); } } ``` @@ -1614,12 +1785,10 @@ public final class UserSessionsDisconnectSamples { ### UserSessions_Get ```java -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/preview/2022-10-14-preview/examples/UserSession_Get.json */ /** * Sample code: UserSession_Get. @@ -1630,7 +1799,8 @@ public final class UserSessionsGetSamples { com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .userSessions() - .getWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", Context.NONE); + .getWithResponse( + "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", com.azure.core.util.Context.NONE); } } ``` @@ -1638,12 +1808,10 @@ public final class UserSessionsGetSamples { ### UserSessions_List ```java -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/preview/2022-10-14-preview/examples/UserSession_List.json */ /** * Sample code: UserSession_List. @@ -1652,7 +1820,16 @@ 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, + com.azure.core.util.Context.NONE); } } ``` @@ -1660,12 +1837,10 @@ public final class UserSessionsListSamples { ### UserSessions_ListByHostPool ```java -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/preview/2022-10-14-preview/examples/UserSession_ListByHostPool.json */ /** * Sample code: UserSession_ListByHostPool. @@ -1680,7 +1855,10 @@ public final class UserSessionsListByHostPoolSamples { "resourceGroup1", "hostPool1", "userPrincipalName eq 'user1@microsoft.com' and state eq 'active'", - Context.NONE); + 10, + true, + 0, + com.azure.core.util.Context.NONE); } } ``` @@ -1688,13 +1866,12 @@ public final class UserSessionsListByHostPoolSamples { ### UserSessions_SendMessage ```java -import com.azure.core.util.Context; 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/preview/2022-10-14-preview/examples/UserSession_SendMessage_Post.json */ /** * Sample code: UserSession_SendMessage_Post. @@ -1711,7 +1888,7 @@ public final class UserSessionsSendMessageSamples { "sessionHost1.microsoft.com", "1", new SendMessage().withMessageTitle("title").withMessageBody("body"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1725,7 +1902,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/preview/2022-10-14-preview/examples/Workspace_Create.json */ /** * Sample code: Workspace_Create. @@ -1761,12 +1938,10 @@ public final class WorkspacesCreateOrUpdateSamples { ### Workspaces_Delete ```java -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/preview/2022-10-14-preview/examples/Workspace_Delete.json */ /** * Sample code: Workspace_Delete. @@ -1775,7 +1950,9 @@ 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", com.azure.core.util.Context.NONE); } } ``` @@ -1783,12 +1960,10 @@ public final class WorkspacesDeleteSamples { ### Workspaces_GetByResourceGroup ```java -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/preview/2022-10-14-preview/examples/Workspace_Get.json */ /** * Sample code: Workspace_Get. @@ -1797,7 +1972,9 @@ public final class WorkspacesGetByResourceGroupSamples { */ public static void workspaceGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.workspaces().getByResourceGroupWithResponse("resourceGroup1", "workspace1", Context.NONE); + manager + .workspaces() + .getByResourceGroupWithResponse("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE); } } ``` @@ -1805,12 +1982,10 @@ public final class WorkspacesGetByResourceGroupSamples { ### Workspaces_List ```java -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/preview/2022-10-14-preview/examples/Workspace_ListBySubscription.json */ /** * Sample code: Workspace_ListBySubscription. @@ -1819,7 +1994,7 @@ public final class WorkspacesListSamples { */ public static void workspaceListBySubscription( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.workspaces().list(Context.NONE); + manager.workspaces().list(com.azure.core.util.Context.NONE); } } ``` @@ -1827,12 +2002,10 @@ public final class WorkspacesListSamples { ### Workspaces_ListByResourceGroup ```java -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/preview/2022-10-14-preview/examples/Workspace_ListByResourceGroup.json */ /** * Sample code: Workspace_ListByResourceGroup. @@ -1841,7 +2014,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, com.azure.core.util.Context.NONE); } } ``` @@ -1849,8 +2022,6 @@ public final class WorkspacesListByResourceGroupSamples { ### Workspaces_Update ```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 +2029,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/preview/2022-10-14-preview/examples/Workspace_Update.json */ /** * Sample code: Workspace_Update. @@ -1870,14 +2041,13 @@ public final class WorkspacesUpdateSamples { Workspace resource = manager .workspaces() - .getByResourceGroupWithResponse("resourceGroup1", "workspace1", Context.NONE) + .getByResourceGroupWithResponse("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE) .getValue(); resource .update() .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 9f631ab4a68f..4a00810acc1f 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-preview-2022-10. 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 ab647dc2e230..15d6d885252e 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 @@ -34,6 +34,7 @@ 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; @@ -48,6 +49,7 @@ 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; @@ -66,8 +68,14 @@ public final class DesktopVirtualizationManager { private Workspaces workspaces; + private PrivateEndpointConnections privateEndpointConnections; + + private PrivateLinkResources privateLinkResources; + private ScalingPlans scalingPlans; + private ScalingPlanPooledSchedules scalingPlanPooledSchedules; + private ApplicationGroups applicationGroups; private StartMenuItems startMenuItems; @@ -86,10 +94,6 @@ public final class DesktopVirtualizationManager { private MsixImages msixImages; - private PrivateEndpointConnections privateEndpointConnections; - - private PrivateLinkResources privateLinkResources; - private final DesktopVirtualizationApiClient clientObject; private DesktopVirtualizationManager( @@ -256,7 +260,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(" (") @@ -337,6 +341,31 @@ public Workspaces workspaces() { return workspaces; } + /** + * Gets the resource collection API of PrivateEndpointConnections. + * + * @return Resource collection API of PrivateEndpointConnections. + */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections = + new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + } + return privateEndpointConnections; + } + + /** + * Gets the resource collection API of PrivateLinkResources. + * + * @return Resource collection API of PrivateLinkResources. + */ + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + } + return privateLinkResources; + } + /** * Gets the resource collection API of ScalingPlans. It manages ScalingPlan. * @@ -349,6 +378,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 +499,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 8bcf26cb5a29..14c09dee0e0d 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 @@ -48,28 +48,28 @@ Mono> getByResourceGroupWithResponseAsync( * * @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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationGroupInner 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String applicationGroupName, Context context); + ApplicationGroupInner getByResourceGroup(String resourceGroupName, String applicationGroupName); /** * Create or update an applicationGroup. @@ -108,14 +108,15 @@ 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 com.azure.core.management.exception.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) - ApplicationGroupInner createOrUpdate( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup); + Response createOrUpdateWithResponse( + String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup, Context context); /** * Create or update an applicationGroup. @@ -123,15 +124,14 @@ 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 com.azure.core.management.exception.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) - Response createOrUpdateWithResponse( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup, Context context); + ApplicationGroupInner createOrUpdate( + String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup); /** * Remove an applicationGroup. @@ -164,26 +164,26 @@ Response createOrUpdateWithResponse( * * @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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String applicationGroupName); + Response deleteWithResponse(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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String applicationGroupName, Context context); + void delete(String resourceGroupName, String applicationGroupName); /** * Update an applicationGroup. @@ -206,28 +206,29 @@ 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 com.azure.core.management.exception.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); + Mono updateAsync(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 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,34 +243,22 @@ 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. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return applicationGroupList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter); + PagedFlux listByResourceGroupAsync( + String resourceGroupName, String filter, Integer pageSize, Boolean isDescending, Integer initialSkip); /** * List applicationGroups. @@ -300,6 +289,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,7 +299,13 @@ Response updateWithResponse( * @return applicationGroupList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - 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/fluent/ApplicationsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationsClient.java index c5d01a671370..32935c030ede 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 @@ -51,13 +51,15 @@ Mono> getWithResponseAsync( * @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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInner get(String resourceGroupName, String applicationGroupName, String applicationName); + Response getWithResponse( + String resourceGroupName, String applicationGroupName, String applicationName, Context context); /** * Get an application. @@ -65,15 +67,13 @@ Mono> getWithResponseAsync( * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String applicationGroupName, String applicationName, Context context); + ApplicationInner get(String resourceGroupName, String applicationGroupName, String applicationName); /** * Create or update an application. @@ -114,14 +114,19 @@ 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 com.azure.core.management.exception.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) - ApplicationInner createOrUpdate( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application); + Response createOrUpdateWithResponse( + String resourceGroupName, + String applicationGroupName, + String applicationName, + ApplicationInner application, + Context context); /** * Create or update an application. @@ -130,19 +135,14 @@ 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 com.azure.core.management.exception.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) - Response createOrUpdateWithResponse( - String resourceGroupName, - String applicationGroupName, - String applicationName, - ApplicationInner application, - Context context); + ApplicationInner createOrUpdate( + String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application); /** * Remove an application. @@ -179,12 +179,15 @@ Mono> deleteWithResponseAsync( * @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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String applicationGroupName, String applicationName); + Response deleteWithResponse( + String resourceGroupName, String applicationGroupName, String applicationName, Context context); /** * Remove an application. @@ -192,15 +195,12 @@ Mono> deleteWithResponseAsync( * @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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String applicationGroupName, String applicationName, Context context); + void delete(String resourceGroupName, String applicationGroupName, String applicationName); /** * Update an application. @@ -224,15 +224,13 @@ 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 com.azure.core.management.exception.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); + Mono updateAsync(String resourceGroupName, String applicationGroupName, String applicationName); /** * Update an application. @@ -240,13 +238,20 @@ 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 com.azure.core.management.exception.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) - Mono updateAsync(String resourceGroupName, String applicationGroupName, String applicationName); + Response updateWithResponse( + String resourceGroupName, + String applicationGroupName, + String applicationName, + ApplicationPatch application, + Context context); /** * Update an application. @@ -263,25 +268,25 @@ Mono updateAsync( ApplicationInner update(String resourceGroupName, String applicationGroupName, String applicationName); /** - * Update an application. + * List 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 application Object containing Application definitions. - * @param context The context to associate with this operation. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Application properties along with {@link Response}. + * @return applicationList as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync( String resourceGroupName, String applicationGroupName, - String applicationName, - ApplicationPatch application, - Context context); + Integer pageSize, + Boolean isDescending, + Integer initialSkip); /** * List applications. @@ -314,6 +319,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 +329,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 0acce8b6c33a..3957130b686c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopVirtualizationApiClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopVirtualizationApiClient.java @@ -58,6 +58,20 @@ public interface DesktopVirtualizationApiClient { */ WorkspacesClient getWorkspaces(); + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + PrivateLinkResourcesClient getPrivateLinkResources(); + /** * Gets the ScalingPlansClient object to access its operations. * @@ -65,6 +79,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 +148,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 e3f6e830867b..d44baeeef5eb 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 @@ -51,13 +51,15 @@ Mono> getWithResponseAsync( * @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 com.azure.core.management.exception.ManagementException 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) - DesktopInner get(String resourceGroupName, String applicationGroupName, String desktopName); + Response getWithResponse( + String resourceGroupName, String applicationGroupName, String desktopName, Context context); /** * Get a desktop. @@ -65,15 +67,13 @@ Mono> getWithResponseAsync( * @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 com.azure.core.management.exception.ManagementException 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) - Response getWithResponse( - String resourceGroupName, String applicationGroupName, String desktopName, Context context); + DesktopInner get(String resourceGroupName, String applicationGroupName, String desktopName); /** * Update a desktop. @@ -97,15 +97,13 @@ 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 com.azure.core.management.exception.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); + Mono updateAsync(String resourceGroupName, String applicationGroupName, String desktopName); /** * Update a desktop. @@ -113,13 +111,20 @@ 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 com.azure.core.management.exception.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) - Mono updateAsync(String resourceGroupName, String applicationGroupName, String desktopName); + Response updateWithResponse( + String resourceGroupName, + String applicationGroupName, + String desktopName, + DesktopPatch desktop, + Context context); /** * Update a desktop. @@ -136,25 +141,25 @@ Mono updateAsync( DesktopInner update(String resourceGroupName, String applicationGroupName, String desktopName); /** - * Update a desktop. + * List desktops. * * @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. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Desktop properties along with {@link Response}. + * @return desktopList as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync( String resourceGroupName, String applicationGroupName, - String desktopName, - DesktopPatch desktop, - Context context); + Integer pageSize, + Boolean isDescending, + Integer initialSkip); /** * List desktops. @@ -187,6 +192,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 +202,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 10ae0b09fbf8..e41f0918a9b6 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 @@ -48,28 +48,28 @@ public interface HostPoolsClient { * * @param resourceGroupName The 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - HostPoolInner 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String hostPoolName, Context context); + HostPoolInner getByResourceGroup(String resourceGroupName, String hostPoolName); /** * Create or update a host pool. @@ -100,20 +100,6 @@ Mono> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - HostPoolInner createOrUpdate(String resourceGroupName, String hostPoolName, HostPoolInner hostPool); - /** * Create or update a host pool. * @@ -131,18 +117,18 @@ Response createOrUpdateWithResponse( String resourceGroupName, String hostPoolName, HostPoolInner hostPool, Context context); /** - * 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 force Force flag to delete sessionHost. + * @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 the {@link Response} on successful completion of {@link Mono}. + * @return represents a HostPool definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, Boolean force); + HostPoolInner createOrUpdate(String resourceGroupName, String hostPoolName, HostPoolInner hostPool); /** * Remove a host pool. @@ -153,10 +139,10 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String hostPoolName, Boolean force); + Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, Boolean force); /** * Remove a host pool. @@ -176,27 +162,27 @@ Response createOrUpdateWithResponse( * * @param resourceGroupName The 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String hostPoolName, Boolean force, Context context); + void delete(String resourceGroupName, String hostPoolName); /** * Update a host pool. @@ -218,27 +204,29 @@ 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 com.azure.core.management.exception.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); + Mono updateAsync(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 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. @@ -254,20 +242,20 @@ Mono> updateWithResponseAsync( HostPoolInner update(String resourceGroupName, String hostPoolName); /** - * Update a host pool. + * List 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 hostPool Object containing HostPool definitions. - * @param context The context to associate with this operation. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a HostPool definition along with {@link Response}. + * @return hostPoolList as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String hostPoolName, HostPoolPatch hostPool, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip); /** * List hostPools. @@ -297,6 +285,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,7 +295,22 @@ Response updateWithResponse( * @return hostPoolList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, 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 com.azure.core.management.exception.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(Integer pageSize, Boolean isDescending, Integer initialSkip); /** * List hostPools in subscription. @@ -329,6 +335,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,7 +345,7 @@ Response updateWithResponse( * @return hostPoolList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + PagedIterable list(Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * Registration token of the host pool. @@ -371,26 +380,26 @@ Mono> retrieveRegistrationTokenWithResponseAsync * * @param resourceGroupName The 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - RegistrationInfoInner 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response retrieveRegistrationTokenWithResponse( - String resourceGroupName, String hostPoolName, Context context); + RegistrationInfoInner retrieveRegistrationToken(String resourceGroupName, String hostPoolName); } 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 c0b05592eeac..7e90bbb3199e 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 @@ -51,13 +51,15 @@ Mono> getWithResponseAsync( * @param resourceGroupName The 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - MsixPackageInner get(String resourceGroupName, String hostPoolName, String msixPackageFullName); + Response getWithResponse( + String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context); /** * Get a msixpackage. @@ -65,15 +67,13 @@ Mono> getWithResponseAsync( * @param resourceGroupName The 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context); + MsixPackageInner get(String resourceGroupName, String hostPoolName, String msixPackageFullName); /** * Create or update a MSIX package. @@ -114,14 +114,19 @@ 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 com.azure.core.management.exception.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) - MsixPackageInner createOrUpdate( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage); + Response createOrUpdateWithResponse( + String resourceGroupName, + String hostPoolName, + String msixPackageFullName, + MsixPackageInner msixPackage, + Context context); /** * Create or update a MSIX package. @@ -130,19 +135,14 @@ 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 com.azure.core.management.exception.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) - Response createOrUpdateWithResponse( - String resourceGroupName, - String hostPoolName, - String msixPackageFullName, - MsixPackageInner msixPackage, - Context context); + MsixPackageInner createOrUpdate( + String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage); /** * Remove an MSIX Package. @@ -179,12 +179,15 @@ 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 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String hostPoolName, String msixPackageFullName); + Response deleteWithResponse( + String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context); /** * Remove an MSIX Package. @@ -192,15 +195,12 @@ 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 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context); + void delete(String resourceGroupName, String hostPoolName, String msixPackageFullName); /** * Update an MSIX Package. @@ -224,15 +224,13 @@ 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 com.azure.core.management.exception.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); + Mono updateAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName); /** * Update an MSIX Package. @@ -240,13 +238,20 @@ 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 com.azure.core.management.exception.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) - Mono updateAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName); + Response updateWithResponse( + String resourceGroupName, + String hostPoolName, + String msixPackageFullName, + MsixPackagePatch msixPackage, + Context context); /** * Update an MSIX Package. @@ -263,25 +268,21 @@ Mono updateAsync( MsixPackageInner update(String resourceGroupName, String hostPoolName, String msixPackageFullName); /** - * Update an MSIX Package. + * 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 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. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for MSIX Package properties along with {@link Response}. + * @return msixPackageList as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String hostPoolName, - String msixPackageFullName, - MsixPackagePatch msixPackage, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip); /** * List MSIX packages in hostpool. @@ -314,6 +315,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 +325,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/PrivateEndpointConnectionsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateEndpointConnectionsClient.java index 7fdef13cbec4..b0fe67f7c09f 100644 --- 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 @@ -17,10 +17,10 @@ /** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public interface PrivateEndpointConnectionsClient { /** - * List private endpoint connections associated with hostpool. + * List private endpoint connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -28,14 +28,14 @@ public interface PrivateEndpointConnectionsClient { * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName); + PagedFlux listByWorkspaceAsync( + String resourceGroupName, String workspaceName); /** - * List private endpoint connections associated with hostpool. + * List private endpoint connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -43,14 +43,14 @@ PagedFlux listByHostPoolAsync( * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName); + PagedIterable listByWorkspace( + String resourceGroupName, String workspaceName); /** - * List private endpoint connections associated with hostpool. + * List private endpoint connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -59,14 +59,14 @@ PagedIterable listByHostPool( * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName, Context context); + 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 hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -75,14 +75,14 @@ PagedIterable listByHostPool( * @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); + 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 hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -91,47 +91,47 @@ Mono> getByHostPoolWithRe * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByHostPoolAsync( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + 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 hostPoolName The name of the host pool within the specified resource group. + * @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. + * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionWithSystemDataInner getByHostPool( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + Response getByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); /** * Get a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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}. + * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); + PrivateEndpointConnectionWithSystemDataInner getByWorkspace( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -140,14 +140,14 @@ Response getByHostPoolWithResponse * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteByHostPoolWithResponseAsync( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + 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 hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -156,45 +156,45 @@ Mono> deleteByHostPoolWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteByHostPoolAsync( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + 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 hostPoolName The name of the host pool within the specified resource group. + * @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) - void deleteByHostPool(String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + Response deleteByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); /** * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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 deleteByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); + void deleteByWorkspace(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** * Approve or reject a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -205,9 +205,9 @@ Response deleteByHostPoolWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateByHostPoolWithResponseAsync( + Mono> updateByWorkspaceWithResponseAsync( String resourceGroupName, - String hostPoolName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection); @@ -215,7 +215,7 @@ Mono> updateByHostPoolWit * 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 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. @@ -225,9 +225,9 @@ Mono> updateByHostPoolWit * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateByHostPoolAsync( + Mono updateByWorkspaceAsync( String resourceGroupName, - String hostPoolName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection); @@ -235,49 +235,52 @@ Mono updateByHostPoolAsync( * 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 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. + * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionWithSystemDataInner updateByHostPool( + Response updateByWorkspaceWithResponse( String resourceGroupName, - String hostPoolName, + String workspaceName, String privateEndpointConnectionName, - PrivateEndpointConnection connection); + PrivateEndpointConnection connection, + Context context); /** * Approve or reject a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @param 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}. + * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateByHostPoolWithResponse( + PrivateEndpointConnectionWithSystemDataInner updateByWorkspace( String resourceGroupName, - String hostPoolName, + String workspaceName, String privateEndpointConnectionName, - PrivateEndpointConnection connection, - Context context); + PrivateEndpointConnection connection); /** - * List private endpoint connections. + * List private endpoint connections associated with hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -285,14 +288,29 @@ Response updateByHostPoolWithRespo * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByWorkspaceAsync( - String resourceGroupName, String workspaceName); + PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip); /** - * List private endpoint connections. + * List private endpoint connections associated with hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -300,14 +318,17 @@ PagedFlux listByWorkspaceAsync( * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName); + PagedIterable listByHostPool( + String resourceGroupName, String hostPoolName); /** - * List private endpoint connections. + * List private endpoint connections associated with hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -316,14 +337,19 @@ PagedIterable listByWorkspace( * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName, Context context); + PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * Get a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -332,14 +358,14 @@ PagedIterable listByWorkspace( * @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); + 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 workspaceName The name of the workspace. + * @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. @@ -348,47 +374,47 @@ Mono> getByWorkspaceWithR * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByWorkspaceAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + 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 workspaceName The name of the workspace. + * @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. + * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionWithSystemDataInner getByWorkspace( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + Response getByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); /** * Get a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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}. + * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + PrivateEndpointConnectionWithSystemDataInner getByHostPool( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); /** * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -397,14 +423,14 @@ Response getByWorkspaceWithRespons * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteByWorkspaceWithResponseAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + 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 workspaceName The name of the workspace. + * @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. @@ -413,45 +439,45 @@ Mono> deleteByWorkspaceWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteByWorkspaceAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + 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 workspaceName The name of the workspace. + * @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) - void deleteByWorkspace(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + Response deleteByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); /** * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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 deleteByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + void deleteByHostPool(String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); /** * Approve or reject a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -462,9 +488,9 @@ Response deleteByWorkspaceWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateByWorkspaceWithResponseAsync( + Mono> updateByHostPoolWithResponseAsync( String resourceGroupName, - String workspaceName, + String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection); @@ -472,7 +498,7 @@ Mono> updateByWorkspaceWi * 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 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. @@ -482,9 +508,9 @@ Mono> updateByWorkspaceWi * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateByWorkspaceAsync( + Mono updateByHostPoolAsync( String resourceGroupName, - String workspaceName, + String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection); @@ -492,41 +518,41 @@ Mono updateByWorkspaceAsync( * 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 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. + * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionWithSystemDataInner updateByWorkspace( + Response updateByHostPoolWithResponse( String resourceGroupName, - String workspaceName, + String hostPoolName, String privateEndpointConnectionName, - PrivateEndpointConnection connection); + PrivateEndpointConnection connection, + Context context); /** * Approve or reject a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @param 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}. + * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateByWorkspaceWithResponse( + PrivateEndpointConnectionWithSystemDataInner updateByHostPool( String resourceGroupName, - String workspaceName, + String hostPoolName, String privateEndpointConnectionName, - PrivateEndpointConnection connection, - Context context); + PrivateEndpointConnection connection); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateLinkResourcesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateLinkResourcesClient.java index 859e673b4238..07b8dda0897c 100644 --- 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 @@ -14,77 +14,122 @@ /** 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. + * List the private link resources available for this workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private link resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName); + PagedFlux listByWorkspaceAsync( + String resourceGroupName, String workspaceName, Integer pageSize, Boolean isDescending, Integer initialSkip); /** - * List the private link resources available for this hostpool. + * List the private link resources available for this workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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}. + * @return a list of private link resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByHostPool(String resourceGroupName, String hostPoolName); + PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName); /** - * List the private link resources available for this hostpool. + * List the private link resources available for this workspace. * * @param resourceGroupName The 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. + * @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 listByHostPool( - String resourceGroupName, String hostPoolName, Context context); + PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); /** * List the private link resources available for this workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkspace( + String resourceGroupName, + String workspaceName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private link resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName); + PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip); /** - * List the private link resources available for this workspace. + * List the private link resources available for this hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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 listByWorkspace(String resourceGroupName, String workspaceName); + PagedIterable listByHostPool(String resourceGroupName, String hostPoolName); /** - * List the private link resources available for this workspace. + * List the private link resources available for this hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -92,6 +137,11 @@ PagedIterable listByHostPool( * @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); + 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/ScalingPlanPooledSchedulesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPooledSchedulesClient.java new file mode 100644 index 000000000000..4a06365c0df5 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPooledSchedulesClient.java @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleInner; +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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + Mono> getWithResponseAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + Mono> createWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner scalingPlanSchedule); + + /** + * 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner scalingPlanSchedule); + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteWithResponseAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * Remove a 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(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}. + */ + @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + Mono> updateWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledSchedulePatch scalingPlanSchedule); + + /** + * 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync( + 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. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPooledScheduleList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync( + String resourceGroupName, String scalingPlanName, Integer pageSize, Boolean isDescending, Integer initialSkip); + + /** + * 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 PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 d47902f9df8b..a032ae0d96e0 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 @@ -48,28 +48,28 @@ Mono> getByResourceGroupWithResponseAsync( * * @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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScalingPlanInner 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String scalingPlanName, Context context); + ScalingPlanInner getByResourceGroup(String resourceGroupName, String scalingPlanName); /** * Create or update a scaling plan. @@ -106,13 +106,15 @@ Mono> createWithResponseAsync( * @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. + * @return scalingPlan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScalingPlanInner create(String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan); + Response createWithResponse( + String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan, Context context); /** * Create or update a scaling plan. @@ -120,15 +122,13 @@ Mono> createWithResponseAsync( * @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}. + * @return scalingPlan. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan, Context context); + ScalingPlanInner create(String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan); /** * Remove a scaling plan. @@ -161,26 +161,26 @@ Response createWithResponse( * * @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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String scalingPlanName); + Response deleteWithResponse(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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String scalingPlanName, Context context); + void delete(String resourceGroupName, String scalingPlanName); /** * Update a scaling plan. @@ -202,27 +202,29 @@ 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 com.azure.core.management.exception.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); + Mono updateAsync(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 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. @@ -238,20 +240,20 @@ Mono> updateWithResponseAsync( ScalingPlanInner update(String resourceGroupName, String scalingPlanName); /** - * Update a scaling plan. + * List scaling plans. * * @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. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlan along with {@link Response}. + * @return scalingPlanList as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip); /** * List scaling plans. @@ -281,6 +283,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,7 +293,22 @@ Response updateWithResponse( * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context 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 com.azure.core.management.exception.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(Integer pageSize, Boolean isDescending, Integer initialSkip); /** * List scaling plans in subscription. @@ -313,6 +333,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,7 +343,24 @@ Response updateWithResponse( * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + PagedIterable list(Integer pageSize, Boolean isDescending, Integer initialSkip, 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. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip); /** * List scaling plan associated with hostpool. @@ -353,6 +393,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 +403,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 13d7096863e3..3b0d417491cd 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 @@ -45,20 +45,6 @@ Mono> getWithResponseAsync( @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,20 +62,18 @@ 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. * @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}. + * @return a session host. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force); + SessionHostInner get(String resourceGroupName, String hostPoolName, String sessionHostname); /** * Remove a SessionHost. @@ -101,10 +85,11 @@ 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 {@link Mono} that completes when a successful response is received. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force); + Mono> deleteWithResponseAsync( + String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force); /** * Remove a SessionHost. @@ -126,12 +111,16 @@ 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. + * @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) - void delete(String resourceGroupName, String hostPoolName, String sessionHostname); + Response deleteWithResponse( + String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force, Context context); /** * Remove a SessionHost. @@ -139,16 +128,12 @@ 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. - * @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 hostPoolName, String sessionHostname, Boolean force, Context context); + void delete(String resourceGroupName, String hostPoolName, String sessionHostname); /** * Update a session host. @@ -177,20 +162,13 @@ 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 com.azure.core.management.exception.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); + Mono updateAsync(String resourceGroupName, String hostPoolName, String sessionHostname); /** * Update a session host. @@ -198,13 +176,22 @@ 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 com.azure.core.management.exception.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) - Mono updateAsync(String resourceGroupName, String hostPoolName, String sessionHostname); + Response updateWithResponse( + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Boolean force, + SessionHostPatch sessionHost, + Context context); /** * Update a session host. @@ -221,27 +208,21 @@ Mono updateAsync( SessionHostInner update(String resourceGroupName, String hostPoolName, String sessionHostname); /** - * Update a session host. + * 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 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. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SessionHost definition along with {@link Response}. + * @return sessionHostList as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Boolean force, - SessionHostPatch sessionHost, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip); /** * List sessionHosts. @@ -274,6 +255,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 +265,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 ec4a8949e9c4..2a71d539d743 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 @@ -13,6 +13,27 @@ /** 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. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return startMenuItemList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip); + /** * List start menu items in the given application group. * @@ -44,6 +65,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 +75,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 9011c3d00861..36027db5a9d0 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 @@ -22,13 +22,22 @@ 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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); + PagedFlux listByHostPoolAsync( + String resourceGroupName, + String hostPoolName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip); /** * List userSessions. @@ -62,6 +71,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,7 +82,13 @@ public interface UserSessionsClient { */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName, String filter, Context context); + String resourceGroupName, + String hostPoolName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * Get a userSession. @@ -111,13 +129,15 @@ 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 com.azure.core.management.exception.ManagementException 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) - UserSessionInner get(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + Response getWithResponse( + String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context); /** * Get a userSession. @@ -126,15 +146,13 @@ 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 com.azure.core.management.exception.ManagementException 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) - Response getWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context); + UserSessionInner get(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); /** * Remove a userSession. @@ -160,15 +178,13 @@ 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 com.azure.core.management.exception.ManagementException 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); + Mono deleteAsync(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); /** * Remove a userSession. @@ -177,13 +193,21 @@ 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 com.azure.core.management.exception.ManagementException 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 deleteAsync(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + Response deleteWithResponse( + String resourceGroupName, + String hostPoolName, + String sessionHostname, + String userSessionId, + Boolean force, + Context context); /** * Remove a userSession. @@ -200,27 +224,27 @@ Mono deleteAsync( void delete(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); /** - * Remove 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 force Force flag to login off userSession. - * @param context The context to associate with this operation. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return userSessionList as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync( String resourceGroupName, String hostPoolName, String sessionHostname, - String userSessionId, - Boolean force, - Context context); + Integer pageSize, + Boolean isDescending, + Integer initialSkip); /** * List userSessions. @@ -256,6 +280,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,7 +291,13 @@ Response deleteWithResponse( */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context); + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * Disconnect a userSession. @@ -298,20 +331,6 @@ Mono> disconnectWithResponseAsync( 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); - /** * Disconnect a userSession. * @@ -330,25 +349,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. @@ -361,10 +373,10 @@ Mono> sendMessageWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono sendMessageAsync( + Mono> sendMessageWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname, @@ -394,12 +406,21 @@ 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 com.azure.core.management.exception.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) - void sendMessage(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + Response sendMessageWithResponse( + String resourceGroupName, + String hostPoolName, + String sessionHostname, + String userSessionId, + SendMessage sendMessage, + Context context); /** * Send a message to a user. @@ -408,19 +429,10 @@ 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 com.azure.core.management.exception.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); + 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/fluent/WorkspacesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/WorkspacesClient.java index 0ef2fecc1512..aac2771e92a3 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 @@ -47,28 +47,28 @@ public interface WorkspacesClient { * * @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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context); + WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); /** * Create or update a workspace. @@ -105,13 +105,15 @@ Mono> createOrUpdateWithResponseAsync( * @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. + * @return represents a Workspace definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner workspace); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, WorkspaceInner workspace, Context context); /** * Create or update a workspace. @@ -119,15 +121,13 @@ Mono> createOrUpdateWithResponseAsync( * @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}. + * @return represents a Workspace definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, WorkspaceInner workspace, Context context); + WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner workspace); /** * Remove a workspace. @@ -160,26 +160,26 @@ Response createOrUpdateWithResponse( * * @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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName); + Response deleteWithResponse(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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, Context context); + void delete(String resourceGroupName, String workspaceName); /** * Update a workspace. @@ -201,27 +201,29 @@ 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 com.azure.core.management.exception.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); + Mono updateAsync(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 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. @@ -237,20 +239,20 @@ Mono> updateWithResponseAsync( WorkspaceInner update(String resourceGroupName, String workspaceName); /** - * Update a workspace. + * List workspaces. * * @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. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Workspace definition along with {@link Response}. + * @return workspaceList as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String workspaceName, WorkspacePatch workspace, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip); /** * List workspaces. @@ -280,6 +282,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,7 +292,8 @@ Response updateWithResponse( * @return workspaceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - 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/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 def9927163ba..da8dba500011 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 9b8fb6659f2a..e3d19f6baf5f 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 d7d32cab484d..4973473feaaa 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 51da15bc850e..95a3eee8def3 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 96a612ca0d1d..48003f018adb 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 410022ce3513..cb168d91b007 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 f9713b4ca499..664d9527b2b6 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 121ced400e71..5b2861930ca8 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 6d9dce54e23c..de310b145b67 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 599dfbe2604f..b58ac6261582 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 0c724762e5f6..cb3cd7bf906e 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 0cc1d2125cbd..ba3ef226255a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolInner.java @@ -7,12 +7,13 @@ 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.HostpoolPublicNetworkAccess; 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.PrivateEndpointConnection; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySet; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan; @@ -37,6 +38,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 +523,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. * @@ -556,7 +538,7 @@ public Boolean cloudPcResource() { * * @return the publicNetworkAccess value. */ - public PublicNetworkAccess publicNetworkAccess() { + public HostpoolPublicNetworkAccess publicNetworkAccess() { return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); } @@ -567,7 +549,7 @@ public PublicNetworkAccess publicNetworkAccess() { * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the HostPoolInner object itself. */ - public HostPoolInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + public HostPoolInner withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess) { if (this.innerProperties() == null) { this.innerProperties = new HostPoolPropertiesInner(); } @@ -575,6 +557,41 @@ public HostPoolInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAc return this; } + /** + * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. + * + * @return the agentUpdate value. + */ + public AgentUpdateProperties agentUpdate() { + return this.innerProperties() == null ? null : this.innerProperties().agentUpdate(); + } + + /** + * Set the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. + * + * @param agentUpdate the agentUpdate value to set. + * @return the HostPoolInner object itself. + */ + public HostPoolInner withAgentUpdate(AgentUpdateProperties agentUpdate) { + if (this.innerProperties() == null) { + this.innerProperties = new HostPoolPropertiesInner(); + } + this.innerProperties().withAgentUpdate(agentUpdate); + return this; + } + + /** + * Get the privateEndpointConnections property: List of private endpoint connection associated with the specified + * resource. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + } + /** * Validates the instance. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPatchProperties.java index 48cd2d344110..69441f3879f7 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPatchProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPatchProperties.java @@ -5,10 +5,11 @@ 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.HostpoolPublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfoPatch; import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import com.fasterxml.jackson.annotation.JsonProperty; @@ -83,15 +84,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 +102,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; @@ -119,7 +117,17 @@ public final class HostPoolPatchProperties { * Enabled to allow this resource to be access from the public network */ @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; + private HostpoolPublicNetworkAccess publicNetworkAccess; + + /* + * The session host configuration for updating agent, monitoring agent, and stack component. + */ + @JsonProperty(value = "agentUpdate") + private AgentUpdatePatchProperties agentUpdate; + + /** Creates an instance of HostPoolPatchProperties class. */ + public HostPoolPatchProperties() { + } /** * Get the friendlyName property: Friendly name of HostPool. @@ -451,7 +459,7 @@ public HostPoolPatchProperties withStartVMOnConnect(Boolean startVMOnConnect) { * * @return the publicNetworkAccess value. */ - public PublicNetworkAccess publicNetworkAccess() { + public HostpoolPublicNetworkAccess publicNetworkAccess() { return this.publicNetworkAccess; } @@ -461,11 +469,33 @@ public PublicNetworkAccess publicNetworkAccess() { * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the HostPoolPatchProperties object itself. */ - public HostPoolPatchProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + public HostPoolPatchProperties withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess) { this.publicNetworkAccess = publicNetworkAccess; return this; } + /** + * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. + * + * @return the agentUpdate value. + */ + public AgentUpdatePatchProperties agentUpdate() { + return this.agentUpdate; + } + + /** + * Set the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. + * + * @param agentUpdate the agentUpdate value to set. + * @return the HostPoolPatchProperties object itself. + */ + public HostPoolPatchProperties withAgentUpdate(AgentUpdatePatchProperties agentUpdate) { + this.agentUpdate = agentUpdate; + return this; + } + /** * Validates the instance. * @@ -475,5 +505,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 761ad2ad2bed..1c5a76f63204 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPropertiesInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPropertiesInner.java @@ -6,12 +6,13 @@ 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.HostpoolPublicNetworkAccess; 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.PrivateEndpointConnection; import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -104,15 +105,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 +123,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 +134,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 +141,27 @@ 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 + * 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; + private HostpoolPublicNetworkAccess publicNetworkAccess; + + /* + * The session host configuration for updating agent, monitoring agent, and stack component. + */ + @JsonProperty(value = "agentUpdate") + private AgentUpdateProperties agentUpdate; + + /* + * List of private endpoint connection associated with the specified resource + */ + @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + + /** Creates an instance of HostPoolPropertiesInner class. */ + public HostPoolPropertiesInner() { + } /** * Get the objectId property: ObjectId of HostPool. (internal use). @@ -519,26 +526,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. * @@ -554,7 +541,7 @@ public Boolean cloudPcResource() { * * @return the publicNetworkAccess value. */ - public PublicNetworkAccess publicNetworkAccess() { + public HostpoolPublicNetworkAccess publicNetworkAccess() { return this.publicNetworkAccess; } @@ -565,11 +552,43 @@ public PublicNetworkAccess publicNetworkAccess() { * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the HostPoolPropertiesInner object itself. */ - public HostPoolPropertiesInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + public HostPoolPropertiesInner withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess) { this.publicNetworkAccess = publicNetworkAccess; return this; } + /** + * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. + * + * @return the agentUpdate value. + */ + public AgentUpdateProperties agentUpdate() { + return this.agentUpdate; + } + + /** + * Set the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. + * + * @param agentUpdate the agentUpdate value to set. + * @return the HostPoolPropertiesInner object itself. + */ + public HostPoolPropertiesInner withAgentUpdate(AgentUpdateProperties agentUpdate) { + this.agentUpdate = agentUpdate; + return this; + } + + /** + * Get the privateEndpointConnections property: List of private endpoint connection associated with the specified + * resource. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + /** * Validates the instance. * @@ -597,8 +616,11 @@ public void validate() { new IllegalArgumentException( "Missing required property preferredAppGroupType in model HostPoolPropertiesInner")); } - if (migrationRequest() != null) { - migrationRequest().validate(); + if (agentUpdate() != null) { + agentUpdate().validate(); + } + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.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 9a21fb0061b1..8c5bc71f9980 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 ee54e37107d2..accc572ba392 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 ded353ee097c..1ada5f495a17 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 index cf5e83fe67a8..38057b464ed5 100644 --- 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 @@ -21,8 +21,7 @@ public final class PrivateEndpointConnectionProperties { private PrivateEndpoint privateEndpoint; /* - * A collection of information about the state of the connection between - * service consumer and provider. + * A collection of information about the state of the connection between service consumer and provider. */ @JsonProperty(value = "privateLinkServiceConnectionState", required = true) private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; @@ -30,9 +29,13 @@ public final class PrivateEndpointConnectionProperties { /* * The provisioning state of the private endpoint connection resource. */ - @JsonProperty(value = "provisioningState") + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PrivateEndpointConnectionProvisioningState provisioningState; + /** Creates an instance of PrivateEndpointConnectionProperties class. */ + public PrivateEndpointConnectionProperties() { + } + /** * Get the privateEndpoint property: The resource of private end point. * @@ -85,18 +88,6 @@ 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. * 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 index f9e336cc665e..625ff47548f1 100644 --- 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 @@ -8,7 +8,6 @@ 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; @@ -21,6 +20,10 @@ public final class PrivateEndpointConnectionWithSystemDataInner extends PrivateE @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of PrivateEndpointConnectionWithSystemDataInner class. */ + public PrivateEndpointConnectionWithSystemDataInner() { + } + /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * @@ -45,14 +48,6 @@ public PrivateEndpointConnectionWithSystemDataInner withPrivateLinkServiceConnec return this; } - /** {@inheritDoc} */ - @Override - public PrivateEndpointConnectionWithSystemDataInner withProvisioningState( - PrivateEndpointConnectionProvisioningState provisioningState) { - super.withProvisioningState(provisioningState); - return this; - } - /** * Validates the instance. * 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 index 439b90260a48..bcbcdafc61ba 100644 --- 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 @@ -18,6 +18,10 @@ public final class PrivateLinkResourceInner extends ProxyResource { @JsonProperty(value = "properties") private PrivateLinkResourceProperties innerProperties; + /** Creates an instance of PrivateLinkResourceInner class. */ + public PrivateLinkResourceInner() { + } + /** * Get the innerProperties property: Resource properties. * 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 index ece05fd31c26..c6b1b9b130d0 100644 --- 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 @@ -29,6 +29,10 @@ public final class PrivateLinkResourceProperties { @JsonProperty(value = "requiredZoneNames") private List requiredZoneNames; + /** Creates an instance of PrivateLinkResourceProperties class. */ + public PrivateLinkResourceProperties() { + } + /** * Get the groupId property: The private link resource group id. * 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 37db6b73c8a4..5f0231ddac67 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 e3e61a89f90d..a831f4453f31 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 848b0ba98bd2..5d1edd7520cb 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 a29a142e8755..f45e9b0364c2 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 000000000000..42558d7dc480 --- /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 000000000000..93b650a07c2f --- /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 46ed04be81b9..73fcf6c87140 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 927a5b91fbd6..fa94341d807a 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 46a45946e5df..9a71b1b6ab2a 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 840a5ad6dd54..e59277002883 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 07ba23136535..7e6345c2bab5 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 f80324dad372..6ae58ea60c2f 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 0f622d805ba7..2246919d2539 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 47d8a58dde27..925653d0fdf5 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 38be786b03dc..6af070c09a8f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceInner.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.SystemData; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySet; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; @@ -30,6 +31,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. * @@ -209,6 +214,16 @@ public WorkspaceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkA return this; } + /** + * Get the privateEndpointConnections property: List of private endpoint connection associated with the specified + * resource. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + } + /** * Validates the instance. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspacePatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspacePatchProperties.java index c428ece14797..4ec700cac29a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspacePatchProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspacePatchProperties.java @@ -36,6 +36,10 @@ public final class WorkspacePatchProperties { @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; + /** Creates an instance of WorkspacePatchProperties class. */ + public WorkspacePatchProperties() { + } + /** * Get the description property: Description of Workspace. * 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 6ce6ef2e3fd2..aec93ac5b3cd 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.desktopvirtualization.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -43,13 +44,22 @@ public final class WorkspaceProperties { 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 + * Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource + * to only be accessed via private endpoints */ @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; + /* + * List of private endpoint connection associated with the specified resource + */ + @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + + /** Creates an instance of WorkspaceProperties class. */ + public WorkspaceProperties() { + } + /** * Get the objectId property: ObjectId of Workspace. (internal use). * @@ -150,11 +160,24 @@ public WorkspaceProperties withPublicNetworkAccess(PublicNetworkAccess publicNet return this; } + /** + * Get the privateEndpointConnections property: List of private endpoint connection associated with the specified + * resource. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupImpl.java index eb7fea099b09..5bb695f67ac4 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 5ddd40f0fa50..3c7fd77b9f8a 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 @@ -60,7 +60,7 @@ public final class ApplicationGroupsClientImpl implements ApplicationGroupsClien */ @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") - private interface ApplicationGroupsService { + public interface ApplicationGroupsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" @@ -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); @@ -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(); } /** @@ -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(); } /** @@ -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); } /** @@ -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) { + public 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) { + public 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)); } @@ -947,8 +954,11 @@ public PagedFlux listByResourceGroupAsync(String resource @ServiceMethod(returns = ReturnType.COLLECTION) public 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)); } /** @@ -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 f1565227bcde..b9289db001ba 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 01248b359e02..1827715d0858 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 @@ -60,7 +60,7 @@ public final class ApplicationsClientImpl implements ApplicationsClient { */ @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") - private interface ApplicationsService { + public interface ApplicationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" @@ -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); @@ -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(); } /** @@ -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(); } /** @@ -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); } /** @@ -791,7 +796,6 @@ 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. @@ -799,7 +803,8 @@ private Mono> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateAsync( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationPatch application) { + 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) + public 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. * @@ -990,8 +1023,11 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public 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 86913a806770..acbdfe53b165 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 c79bb0b58dd0..cd894795de88 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 88fdf33b1702..ed954afdf6e7 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 @@ -32,6 +32,7 @@ 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; @@ -145,6 +146,30 @@ public WorkspacesClient getWorkspaces() { return this.workspaces; } + /** The PrivateEndpointConnectionsClient object to access its operations. */ + private final PrivateEndpointConnectionsClient privateEndpointConnections; + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** The PrivateLinkResourcesClient object to access its operations. */ + private final PrivateLinkResourcesClient privateLinkResources; + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; + } + /** The ScalingPlansClient object to access its operations. */ private final ScalingPlansClient scalingPlans; @@ -157,6 +182,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 +302,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 +324,13 @@ public PrivateLinkResourcesClient getPrivateLinkResources() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-09-03-preview"; + this.apiVersion = "2022-10-14-preview"; this.operations = new OperationsClientImpl(this); this.workspaces = new WorkspacesClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.scalingPlans = new ScalingPlansClientImpl(this); + this.scalingPlanPooledSchedules = new ScalingPlanPooledSchedulesClientImpl(this); this.applicationGroups = new ApplicationGroupsClientImpl(this); this.startMenuItems = new StartMenuItemsClientImpl(this); this.applications = new ApplicationsClientImpl(this); @@ -324,8 +340,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 cffd4401bd9c..74a3e2112fdb 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 @@ -57,7 +57,7 @@ public final class DesktopsClientImpl implements DesktopsClient { */ @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") - private interface DesktopsService { + public interface DesktopsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" @@ -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); @@ -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(); } /** @@ -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) { + 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())); } @@ -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) + public 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. * @@ -597,8 +628,11 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public 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 eb7ea60e67e4..d0c88cc6d185 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 37d4afa1e87d..c1f35897f130 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolImpl.java @@ -10,14 +10,16 @@ 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.HostpoolPublicNetworkAccess; 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.PrivateEndpointConnection; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfo; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfoPatch; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; @@ -172,18 +174,27 @@ public Boolean startVMOnConnect() { return this.innerModel().startVMOnConnect(); } - public MigrationRequestProperties migrationRequest() { - return this.innerModel().migrationRequest(); - } - public Boolean cloudPcResource() { return this.innerModel().cloudPcResource(); } - public PublicNetworkAccess publicNetworkAccess() { + public HostpoolPublicNetworkAccess publicNetworkAccess() { return this.innerModel().publicNetworkAccess(); } + public AgentUpdateProperties agentUpdate() { + return this.innerModel().agentUpdate(); + } + + public List privateEndpointConnections() { + List inner = this.innerModel().privateEndpointConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public Region region() { return Region.fromName(this.regionName()); } @@ -296,16 +307,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,12 +522,7 @@ public HostPoolImpl withStartVMOnConnect(Boolean startVMOnConnect) { } } - public HostPoolImpl withMigrationRequest(MigrationRequestProperties migrationRequest) { - this.innerModel().withMigrationRequest(migrationRequest); - return this; - } - - public HostPoolImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + public HostPoolImpl withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess) { if (isInCreateMode()) { this.innerModel().withPublicNetworkAccess(publicNetworkAccess); return this; @@ -526,11 +532,21 @@ public HostPoolImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAcc } } + public HostPoolImpl withAgentUpdate(AgentUpdateProperties agentUpdate) { + this.innerModel().withAgentUpdate(agentUpdate); + 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 53e13f141db9..fe4dac4abd98 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolPropertiesImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolPropertiesImpl.java @@ -6,13 +6,14 @@ 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.HostpoolPublicNetworkAccess; 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.PrivateEndpointConnection; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfo; import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import java.util.Collections; @@ -116,18 +117,27 @@ public Boolean startVMOnConnect() { return this.innerModel().startVMOnConnect(); } - public MigrationRequestProperties migrationRequest() { - return this.innerModel().migrationRequest(); - } - public Boolean cloudPcResource() { return this.innerModel().cloudPcResource(); } - public PublicNetworkAccess publicNetworkAccess() { + public HostpoolPublicNetworkAccess publicNetworkAccess() { return this.innerModel().publicNetworkAccess(); } + public AgentUpdateProperties agentUpdate() { + return this.innerModel().agentUpdate(); + } + + public List privateEndpointConnections() { + List inner = this.innerModel().privateEndpointConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public HostPoolPropertiesInner innerModel() { return this.innerObject; } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolsClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolsClientImpl.java index 2d92bea56a97..0b487bf0f6d2 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 @@ -62,7 +62,7 @@ public final class HostPoolsClientImpl implements HostPoolsClient { */ @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") - private interface HostPoolsService { + public interface HostPoolsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" @@ -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); @@ -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(); } /** @@ -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(); } /** @@ -586,22 +592,6 @@ private Mono> deleteWithResponseAsync( 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 ManagementException 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) { - return deleteWithResponseAsync(resourceGroupName, hostPoolName, force).flatMap(ignored -> Mono.empty()); - } - /** * Remove a host pool. * @@ -623,14 +613,17 @@ public Mono deleteAsync(String resourceGroupName, String hostPoolName) { * * @param resourceGroupName The 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 void delete(String resourceGroupName, String hostPoolName) { - final Boolean force = null; - deleteAsync(resourceGroupName, hostPoolName, force).block(); + public Response deleteWithResponse( + String resourceGroupName, String hostPoolName, Boolean force, Context context) { + return deleteWithResponseAsync(resourceGroupName, hostPoolName, force, context).block(); } /** @@ -638,17 +631,14 @@ public void delete(String resourceGroupName, String hostPoolName) { * * @param resourceGroupName The 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(); + public void delete(String resourceGroupName, String hostPoolName) { + final Boolean force = null; + deleteWithResponse(resourceGroupName, hostPoolName, force, Context.NONE); } /** @@ -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) { + public 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( @@ -924,6 +910,26 @@ private Mono> listByResourceGroupSinglePageAsync( null)); } + /** + * 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, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + /** * List hostPools. * @@ -935,8 +941,11 @@ private Mono> listByResourceGroupSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public 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)); } @@ -944,6 +953,9 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupNam * 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( @@ -1073,6 +1109,24 @@ private Mono> listSinglePageAsync(Context context) null)); } + /** + * 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(Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + /** * List hostPools in subscription. * @@ -1082,12 +1136,20 @@ private Mono> listSinglePageAsync(Context context) */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + 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)); } /** @@ -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 ef0119b4f39c..7ae460fcf6fa 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 2bfa54bba784..04f13370796e 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 @@ -58,7 +58,7 @@ public final class MsixImagesClientImpl implements MsixImagesClient { */ @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") - private interface MsixImagesService { + public interface MsixImagesService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" @@ -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 59c816ef50c0..238da91349e4 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 @@ -60,7 +60,7 @@ public final class MsixPackagesClientImpl implements MsixPackagesClient { */ @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") - private interface MsixPackagesService { + public interface MsixPackagesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers" @@ -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); @@ -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(); } /** @@ -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(); } /** @@ -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); } /** @@ -778,7 +783,6 @@ 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. @@ -786,7 +790,8 @@ private Mono> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackagePatch msixPackage) { + 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( @@ -962,6 +967,27 @@ private Mono> listSinglePageAsync( null)); } + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + /** * List MSIX packages in hostpool. * @@ -974,8 +1000,12 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync(String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, hostPoolName), nextLink -> listNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -983,6 +1013,9 @@ 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. + * @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 cbcacf612943..ab3fad5320b7 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 84fb0a66dcda..b67605b22e27 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 @@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.DesktopVirtualization/operations") @ExpectedResponses({200}) @@ -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/PrivateEndpointConnectionsClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsClientImpl.java index df76637056b8..5ef7eae5cc6a 100644 --- 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 @@ -61,35 +61,35 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi */ @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") - private interface PrivateEndpointConnectionsService { + public interface PrivateEndpointConnectionsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections") + + "/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByHostPool( + Mono> listByWorkspace( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, + @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections" + + "/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections" + "/{privateEndpointConnectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByHostPool( + Mono> getByWorkspace( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, + @PathParam("workspaceName") String workspaceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); @@ -97,16 +97,16 @@ Mono> getByHostPool( @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections" + + "/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections" + "/{privateEndpointConnectionName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> deleteByHostPool( + Mono> deleteByWorkspace( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, + @PathParam("workspaceName") String workspaceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); @@ -114,16 +114,16 @@ Mono> deleteByHostPool( @Headers({"Content-Type: application/json"}) @Put( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections" + + "/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections" + "/{privateEndpointConnectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateByHostPool( + Mono> updateByWorkspace( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, + @PathParam("workspaceName") String workspaceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @BodyParam("application/json") PrivateEndpointConnection connection, @HeaderParam("Accept") String accept, @@ -132,31 +132,34 @@ Mono> updateByHostPool( @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections") + + "/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspace( + Mono> listByHostPool( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + @PathParam("hostPoolName") String hostPoolName, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections" + + "/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections" + "/{privateEndpointConnectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByWorkspace( + Mono> getByHostPool( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + @PathParam("hostPoolName") String hostPoolName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); @@ -164,16 +167,16 @@ Mono> getByWorkspace( @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections" + + "/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections" + "/{privateEndpointConnectionName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> deleteByWorkspace( + Mono> deleteByHostPool( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + @PathParam("hostPoolName") String hostPoolName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); @@ -181,16 +184,16 @@ Mono> deleteByWorkspace( @Headers({"Content-Type: application/json"}) @Put( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections" + + "/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections" + "/{privateEndpointConnectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateByWorkspace( + Mono> updateByHostPool( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + @PathParam("hostPoolName") String hostPoolName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @BodyParam("application/json") PrivateEndpointConnection connection, @HeaderParam("Accept") String accept, @@ -200,7 +203,7 @@ Mono> updateByWorkspace( @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByHostPoolNext( + Mono> listByWorkspaceNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, @@ -210,7 +213,7 @@ Mono> listByHostPool @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspaceNext( + Mono> listByHostPoolNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, @@ -218,10 +221,10 @@ Mono> listByWorkspac } /** - * List private endpoint connections associated with hostpool. + * List private endpoint connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -229,8 +232,8 @@ Mono> listByWorkspac * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, String hostPoolName) { + private Mono> listByWorkspaceSinglePageAsync( + String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -247,20 +250,20 @@ private Mono> listBy 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 (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 - .listByHostPool( + .listByWorkspace( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - hostPoolName, + workspaceName, accept, context)) .>map( @@ -276,10 +279,10 @@ private Mono> listBy } /** - * List private endpoint connections associated with hostpool. + * List private endpoint connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -288,8 +291,8 @@ private Mono> listBy * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, String hostPoolName, Context context) { + private Mono> listByWorkspaceSinglePageAsync( + String resourceGroupName, String workspaceName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -306,18 +309,18 @@ private Mono> listBy 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 (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 - .listByHostPool( + .listByWorkspace( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - hostPoolName, + workspaceName, accept, context) .map( @@ -332,10 +335,10 @@ private Mono> listBy } /** - * List private endpoint connections associated with hostpool. + * List private endpoint connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -343,18 +346,18 @@ private Mono> listBy * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName) { + public PagedFlux listByWorkspaceAsync( + String resourceGroupName, String workspaceName) { return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName), - nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); + () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName), + nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); } /** - * List private endpoint connections associated with hostpool. + * List private endpoint connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -363,18 +366,18 @@ public PagedFlux listByHostPoolAsy * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName, Context context) { + private PagedFlux listByWorkspaceAsync( + String resourceGroupName, String workspaceName, Context context) { return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, context), - nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); + () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, context), + nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); } /** - * List private endpoint connections associated with hostpool. + * List private endpoint connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -382,16 +385,16 @@ private PagedFlux listByHostPoolAs * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName) { - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, hostPoolName)); + public PagedIterable listByWorkspace( + String resourceGroupName, String workspaceName) { + return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName)); } /** - * List private endpoint connections associated with hostpool. + * List private endpoint connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -400,16 +403,16 @@ public PagedIterable listByHostPoo * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName, Context context) { - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, hostPoolName, context)); + 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 hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -418,8 +421,8 @@ public PagedIterable listByHostPoo * @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) { + public Mono> getByWorkspaceWithResponseAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -436,8 +439,8 @@ public Mono> getByHostPoo 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { return Mono @@ -450,12 +453,12 @@ public Mono> getByHostPoo .withContext( context -> service - .getByHostPool( + .getByWorkspace( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - hostPoolName, + workspaceName, privateEndpointConnectionName, accept, context)) @@ -466,7 +469,7 @@ public Mono> getByHostPoo * 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 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. @@ -476,8 +479,8 @@ public Mono> getByHostPoo * @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) { + private Mono> getByWorkspaceWithResponseAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -494,8 +497,8 @@ private Mono> getByHostPo 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { return Mono @@ -506,12 +509,12 @@ private Mono> getByHostPo final String accept = "application/json"; context = this.client.mergeContext(context); return service - .getByHostPool( + .getByWorkspace( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - hostPoolName, + workspaceName, privateEndpointConnectionName, accept, context); @@ -521,7 +524,7 @@ private Mono> getByHostPo * 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 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. @@ -530,9 +533,9 @@ private Mono> getByHostPo * @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) + public Mono getByWorkspaceAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + return getByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -540,45 +543,46 @@ public Mono getByHostPoolAsync( * 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 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. + * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionWithSystemDataInner getByHostPool( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { - return getByHostPoolAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName).block(); + public Response getByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + return getByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) + .block(); } /** * Get a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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}. + * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { - return getByHostPoolWithResponseAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName, context) - .block(); + public PrivateEndpointConnectionWithSystemDataInner getByWorkspace( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + return getByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) + .getValue(); } /** * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -587,8 +591,8 @@ public Response getByHostPoolWithR * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteByHostPoolWithResponseAsync( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + public Mono> deleteByWorkspaceWithResponseAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -605,8 +609,8 @@ public Mono> deleteByHostPoolWithResponseAsync( 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { return Mono @@ -619,12 +623,12 @@ public Mono> deleteByHostPoolWithResponseAsync( .withContext( context -> service - .deleteByHostPool( + .deleteByWorkspace( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - hostPoolName, + workspaceName, privateEndpointConnectionName, accept, context)) @@ -635,7 +639,7 @@ public Mono> deleteByHostPoolWithResponseAsync( * 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 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. @@ -645,8 +649,8 @@ public Mono> deleteByHostPoolWithResponseAsync( * @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) { + private Mono> deleteByWorkspaceWithResponseAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -663,8 +667,8 @@ private Mono> deleteByHostPoolWithResponseAsync( 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { return Mono @@ -675,12 +679,12 @@ private Mono> deleteByHostPoolWithResponseAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .deleteByHostPool( + .deleteByWorkspace( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - hostPoolName, + workspaceName, privateEndpointConnectionName, accept, context); @@ -690,7 +694,7 @@ private Mono> deleteByHostPoolWithResponseAsync( * 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 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. @@ -699,9 +703,9 @@ private Mono> deleteByHostPoolWithResponseAsync( * @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) + public Mono deleteByWorkspaceAsync( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + return deleteByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) .flatMap(ignored -> Mono.empty()); } @@ -709,44 +713,45 @@ public Mono deleteByHostPoolAsync( * 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 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 void deleteByHostPool(String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { - deleteByHostPoolAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName).block(); + public Response deleteByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + return deleteByWorkspaceWithResponseAsync( + resourceGroupName, workspaceName, privateEndpointConnectionName, context) + .block(); } /** * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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 deleteByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { - return deleteByHostPoolWithResponseAsync( - resourceGroupName, hostPoolName, privateEndpointConnectionName, context) - .block(); + public void deleteByWorkspace( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + deleteByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE); } /** * Approve or reject a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -757,9 +762,9 @@ public Response deleteByHostPoolWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateByHostPoolWithResponseAsync( + public Mono> updateByWorkspaceWithResponseAsync( String resourceGroupName, - String hostPoolName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection) { if (this.client.getEndpoint() == null) { @@ -778,8 +783,8 @@ public Mono> updateByHost 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { return Mono @@ -797,12 +802,12 @@ public Mono> updateByHost .withContext( context -> service - .updateByHostPool( + .updateByWorkspace( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - hostPoolName, + workspaceName, privateEndpointConnectionName, connection, accept, @@ -814,7 +819,7 @@ public Mono> updateByHost * 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 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. @@ -826,9 +831,9 @@ public Mono> updateByHost * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateByHostPoolWithResponseAsync( + private Mono> updateByWorkspaceWithResponseAsync( String resourceGroupName, - String hostPoolName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection, Context context) { @@ -848,8 +853,8 @@ private Mono> updateByHos 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { return Mono @@ -865,12 +870,12 @@ private Mono> updateByHos final String accept = "application/json"; context = this.client.mergeContext(context); return service - .updateByHostPool( + .updateByWorkspace( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - hostPoolName, + workspaceName, privateEndpointConnectionName, connection, accept, @@ -881,7 +886,7 @@ private Mono> updateByHos * 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 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. @@ -891,13 +896,13 @@ private Mono> updateByHos * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateByHostPoolAsync( + public Mono updateByWorkspaceAsync( String resourceGroupName, - String hostPoolName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection) { - return updateByHostPoolWithResponseAsync( - resourceGroupName, hostPoolName, privateEndpointConnectionName, connection) + return updateByWorkspaceWithResponseAsync( + resourceGroupName, workspaceName, privateEndpointConnectionName, connection) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -905,22 +910,25 @@ public Mono updateByHostPoolAsync( * 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 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. + * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionWithSystemDataInner updateByHostPool( + public Response updateByWorkspaceWithResponse( String resourceGroupName, - String hostPoolName, + String workspaceName, String privateEndpointConnectionName, - PrivateEndpointConnection connection) { - return updateByHostPoolAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName, connection) + PrivateEndpointConnection connection, + Context context) { + return updateByWorkspaceWithResponseAsync( + resourceGroupName, workspaceName, privateEndpointConnectionName, connection, context) .block(); } @@ -928,33 +936,34 @@ public PrivateEndpointConnectionWithSystemDataInner updateByHostPool( * 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 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}. + * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateByHostPoolWithResponse( + public PrivateEndpointConnectionWithSystemDataInner updateByWorkspace( String resourceGroupName, - String hostPoolName, + String workspaceName, String privateEndpointConnectionName, - PrivateEndpointConnection connection, - Context context) { - return updateByHostPoolWithResponseAsync( - resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, context) - .block(); + PrivateEndpointConnection connection) { + return updateByWorkspaceWithResponse( + resourceGroupName, workspaceName, privateEndpointConnectionName, connection, Context.NONE) + .getValue(); } /** - * List private endpoint connections. + * List private endpoint connections associated with hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -962,8 +971,8 @@ public Response updateByHostPoolWi * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync( - String resourceGroupName, String workspaceName) { + private Mono> listByHostPoolSinglePageAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -980,20 +989,23 @@ private Mono> listBy 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 (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 - .listByWorkspace( + .listByHostPool( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, + hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -1009,10 +1021,13 @@ private Mono> listBy } /** - * List private endpoint connections. + * List private endpoint connections associated with hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -1021,8 +1036,13 @@ private Mono> listBy * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono> listByHostPoolSinglePageAsync( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1039,18 +1059,21 @@ private Mono> listBy 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 (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 - .listByWorkspace( + .listByHostPool( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, + hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -1065,10 +1088,13 @@ private Mono> listBy } /** - * List private endpoint connections. + * List private endpoint connections associated with hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -1076,18 +1102,43 @@ private Mono> listBy * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByWorkspaceAsync( - String resourceGroupName, String workspaceName) { + public PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); + () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); } /** - * List private endpoint connections. + * List private endpoint connections associated with hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @param hostPoolName The name of the host pool within the specified resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); + } + + /** + * List private endpoint connections associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1096,18 +1147,25 @@ public PagedFlux listByWorkspaceAs * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync( - String resourceGroupName, String workspaceName, Context context) { + private PagedFlux listByHostPoolAsync( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); + () -> + listByHostPoolSinglePageAsync( + resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), + nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); } /** - * List private endpoint connections. + * List private endpoint connections associated with hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -1115,16 +1173,23 @@ private PagedFlux listByWorkspaceA * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName)); + public PagedIterable listByHostPool( + String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip)); } /** - * List private endpoint connections. + * List private endpoint connections associated with hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -1133,16 +1198,22 @@ public PagedIterable listByWorkspa * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, context)); + public PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context)); } /** * Get a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -1151,8 +1222,8 @@ public PagedIterable listByWorkspa * @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) { + public Mono> getByHostPoolWithResponseAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1169,8 +1240,8 @@ public Mono> getByWorkspa 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 (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { return Mono @@ -1183,12 +1254,12 @@ public Mono> getByWorkspa .withContext( context -> service - .getByWorkspace( + .getByHostPool( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, + hostPoolName, privateEndpointConnectionName, accept, context)) @@ -1199,7 +1270,7 @@ public Mono> getByWorkspa * 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 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. @@ -1209,8 +1280,8 @@ public Mono> getByWorkspa * @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) { + private Mono> getByHostPoolWithResponseAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1227,8 +1298,8 @@ private Mono> getByWorksp 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 (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { return Mono @@ -1239,12 +1310,12 @@ private Mono> getByWorksp final String accept = "application/json"; context = this.client.mergeContext(context); return service - .getByWorkspace( + .getByHostPool( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, + hostPoolName, privateEndpointConnectionName, accept, context); @@ -1254,7 +1325,7 @@ private Mono> getByWorksp * 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 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. @@ -1263,9 +1334,9 @@ private Mono> getByWorksp * @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) + public Mono getByHostPoolAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + return getByHostPoolWithResponseAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1273,45 +1344,46 @@ public Mono getByWorkspaceAsync( * 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 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. + * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionWithSystemDataInner getByWorkspace( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - return getByWorkspaceAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).block(); + public Response getByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { + return getByHostPoolWithResponseAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName, context) + .block(); } /** * Get a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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}. + * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return getByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) - .block(); + public PrivateEndpointConnectionWithSystemDataInner getByHostPool( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + return getByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, Context.NONE) + .getValue(); } /** * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -1320,8 +1392,8 @@ public Response getByWorkspaceWith * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteByWorkspaceWithResponseAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + public Mono> deleteByHostPoolWithResponseAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1338,8 +1410,8 @@ public Mono> deleteByWorkspaceWithResponseAsync( 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 (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { return Mono @@ -1352,12 +1424,12 @@ public Mono> deleteByWorkspaceWithResponseAsync( .withContext( context -> service - .deleteByWorkspace( + .deleteByHostPool( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, + hostPoolName, privateEndpointConnectionName, accept, context)) @@ -1368,7 +1440,7 @@ public Mono> deleteByWorkspaceWithResponseAsync( * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -1378,8 +1450,8 @@ public Mono> deleteByWorkspaceWithResponseAsync( * @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) { + private Mono> deleteByHostPoolWithResponseAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1396,8 +1468,8 @@ private Mono> deleteByWorkspaceWithResponseAsync( 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 (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { return Mono @@ -1408,12 +1480,12 @@ private Mono> deleteByWorkspaceWithResponseAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .deleteByWorkspace( + .deleteByHostPool( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, + hostPoolName, privateEndpointConnectionName, accept, context); @@ -1423,7 +1495,7 @@ private Mono> deleteByWorkspaceWithResponseAsync( * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -1432,9 +1504,9 @@ private Mono> deleteByWorkspaceWithResponseAsync( * @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) + public Mono deleteByHostPoolAsync( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + return deleteByHostPoolWithResponseAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName) .flatMap(ignored -> Mono.empty()); } @@ -1442,45 +1514,44 @@ public Mono deleteByWorkspaceAsync( * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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 void deleteByWorkspace( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - deleteByWorkspaceAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).block(); + public Response deleteByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { + return deleteByHostPoolWithResponseAsync( + resourceGroupName, hostPoolName, privateEndpointConnectionName, context) + .block(); } /** * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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 deleteByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return deleteByWorkspaceWithResponseAsync( - resourceGroupName, workspaceName, privateEndpointConnectionName, context) - .block(); + public void deleteByHostPool(String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + deleteByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, Context.NONE); } /** * Approve or reject a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -1491,9 +1562,9 @@ public Response deleteByWorkspaceWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateByWorkspaceWithResponseAsync( + public Mono> updateByHostPoolWithResponseAsync( String resourceGroupName, - String workspaceName, + String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection) { if (this.client.getEndpoint() == null) { @@ -1512,8 +1583,8 @@ public Mono> updateByWork 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 (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { return Mono @@ -1531,12 +1602,12 @@ public Mono> updateByWork .withContext( context -> service - .updateByWorkspace( + .updateByHostPool( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, + hostPoolName, privateEndpointConnectionName, connection, accept, @@ -1548,7 +1619,7 @@ public Mono> updateByWork * 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 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. @@ -1560,9 +1631,9 @@ public Mono> updateByWork * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateByWorkspaceWithResponseAsync( + private Mono> updateByHostPoolWithResponseAsync( String resourceGroupName, - String workspaceName, + String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection, Context context) { @@ -1582,8 +1653,8 @@ private Mono> updateByWor 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 (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { return Mono @@ -1599,12 +1670,12 @@ private Mono> updateByWor final String accept = "application/json"; context = this.client.mergeContext(context); return service - .updateByWorkspace( + .updateByHostPool( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, + hostPoolName, privateEndpointConnectionName, connection, accept, @@ -1615,7 +1686,7 @@ private Mono> updateByWor * 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 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. @@ -1625,13 +1696,13 @@ private Mono> updateByWor * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateByWorkspaceAsync( + public Mono updateByHostPoolAsync( String resourceGroupName, - String workspaceName, + String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection) { - return updateByWorkspaceWithResponseAsync( - resourceGroupName, workspaceName, privateEndpointConnectionName, connection) + return updateByHostPoolWithResponseAsync( + resourceGroupName, hostPoolName, privateEndpointConnectionName, connection) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1639,22 +1710,25 @@ public Mono updateByWorkspaceAsync * 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 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. + * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionWithSystemDataInner updateByWorkspace( + public Response updateByHostPoolWithResponse( String resourceGroupName, - String workspaceName, + String hostPoolName, String privateEndpointConnectionName, - PrivateEndpointConnection connection) { - return updateByWorkspaceAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, connection) + PrivateEndpointConnection connection, + Context context) { + return updateByHostPoolWithResponseAsync( + resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, context) .block(); } @@ -1662,32 +1736,31 @@ public PrivateEndpointConnectionWithSystemDataInner updateByWorkspace( * 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 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}. + * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateByWorkspaceWithResponse( + public PrivateEndpointConnectionWithSystemDataInner updateByHostPool( String resourceGroupName, - String workspaceName, + String hostPoolName, String privateEndpointConnectionName, - PrivateEndpointConnection connection, - Context context) { - return updateByWorkspaceWithResponseAsync( - resourceGroupName, workspaceName, privateEndpointConnectionName, connection, context) - .block(); + PrivateEndpointConnection connection) { + return updateByHostPoolWithResponse( + resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, 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. @@ -1695,7 +1768,7 @@ public Response updateByWorkspaceW * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolNextSinglePageAsync( + private Mono> listByWorkspaceNextSinglePageAsync( String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1708,7 +1781,7 @@ private Mono> listBy } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( res -> new PagedResponseBase<>( @@ -1724,7 +1797,8 @@ private Mono> listBy /** * 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. @@ -1733,7 +1807,7 @@ private Mono> listBy * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolNextSinglePageAsync( + private Mono> listByWorkspaceNextSinglePageAsync( String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1747,7 +1821,7 @@ private Mono> listBy final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context) + .listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context) .map( res -> new PagedResponseBase<>( @@ -1762,7 +1836,8 @@ private Mono> listBy /** * 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. @@ -1770,7 +1845,7 @@ private Mono> listBy * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync( + private Mono> listByHostPoolNextSinglePageAsync( String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1783,7 +1858,7 @@ private Mono> listBy } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( res -> new PagedResponseBase<>( @@ -1799,7 +1874,8 @@ private Mono> listBy /** * 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. @@ -1808,7 +1884,7 @@ private Mono> listBy * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync( + private Mono> listByHostPoolNextSinglePageAsync( String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1822,7 +1898,7 @@ private Mono> listBy final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context) + .listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context) .map( res -> new PagedResponseBase<>( 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 index e15b089cea56..9c1e1c9a0ca7 100644 --- 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 @@ -29,37 +29,26 @@ public PrivateEndpointConnectionsImpl( this.serviceManager = serviceManager; } - public PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName) { + public PagedIterable listByWorkspace( + String resourceGroupName, String workspaceName) { PagedIterable inner = - this.serviceClient().listByHostPool(resourceGroupName, hostPoolName); + this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager())); } - public PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName, Context context) { + public PagedIterable listByWorkspace( + String resourceGroupName, String workspaceName, Context context) { PagedIterable inner = - this.serviceClient().listByHostPool(resourceGroupName, hostPoolName, context); + this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, 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) { + public Response getByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { Response inner = this .serviceClient() - .getByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, context); + .getByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), @@ -71,26 +60,10 @@ public Response getByHostPoolWithRespon } } - 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) { + public PrivateEndpointConnectionWithSystemData getByWorkspace( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { PrivateEndpointConnectionWithSystemDataInner inner = - this - .serviceClient() - .updateByHostPool(resourceGroupName, hostPoolName, privateEndpointConnectionName, connection); + this.serviceClient().getByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName); if (inner != null) { return new PrivateEndpointConnectionWithSystemDataImpl(inner, this.manager()); } else { @@ -98,17 +71,29 @@ public PrivateEndpointConnectionWithSystemData updateByHostPool( } } - public Response updateByHostPoolWithResponse( + public Response deleteByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + return this + .serviceClient() + .deleteByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); + } + + public void deleteByWorkspace( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + this.serviceClient().deleteByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName); + } + + public Response updateByWorkspaceWithResponse( String resourceGroupName, - String hostPoolName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection, Context context) { Response inner = this .serviceClient() - .updateByHostPoolWithResponse( - resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, context); + .updateByWorkspaceWithResponse( + resourceGroupName, workspaceName, privateEndpointConnectionName, connection, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), @@ -120,24 +105,15 @@ public Response updateByHostPoolWithRes } } - 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) { + public PrivateEndpointConnectionWithSystemData updateByWorkspace( + String resourceGroupName, + String workspaceName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection) { PrivateEndpointConnectionWithSystemDataInner inner = - this.serviceClient().getByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName); + this + .serviceClient() + .updateByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName, connection); if (inner != null) { return new PrivateEndpointConnectionWithSystemDataImpl(inner, this.manager()); } else { @@ -145,12 +121,33 @@ public PrivateEndpointConnectionWithSystemData getByWorkspace( } } - public Response getByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + public PagedIterable listByHostPool( + String resourceGroupName, String hostPoolName) { + PagedIterable inner = + this.serviceClient().listByHostPool(resourceGroupName, hostPoolName); + return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager())); + } + + public PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + PagedIterable inner = + this + .serviceClient() + .listByHostPool(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context); + return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager())); + } + + public Response getByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { Response inner = this .serviceClient() - .getByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); + .getByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), @@ -162,27 +159,10 @@ public Response getByWorkspaceWithRespo } } - 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) { + public PrivateEndpointConnectionWithSystemData getByHostPool( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { PrivateEndpointConnectionWithSystemDataInner inner = - this - .serviceClient() - .updateByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName, connection); + this.serviceClient().getByHostPool(resourceGroupName, hostPoolName, privateEndpointConnectionName); if (inner != null) { return new PrivateEndpointConnectionWithSystemDataImpl(inner, this.manager()); } else { @@ -190,17 +170,28 @@ public PrivateEndpointConnectionWithSystemData updateByWorkspace( } } - public Response updateByWorkspaceWithResponse( + public Response deleteByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { + return this + .serviceClient() + .deleteByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, context); + } + + public void deleteByHostPool(String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + this.serviceClient().deleteByHostPool(resourceGroupName, hostPoolName, privateEndpointConnectionName); + } + + public Response updateByHostPoolWithResponse( String resourceGroupName, - String workspaceName, + String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection, Context context) { Response inner = this .serviceClient() - .updateByWorkspaceWithResponse( - resourceGroupName, workspaceName, privateEndpointConnectionName, connection, context); + .updateByHostPoolWithResponse( + resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), @@ -212,6 +203,22 @@ public Response updateByWorkspaceWithRe } } + public PrivateEndpointConnectionWithSystemData updateByHostPool( + String resourceGroupName, + String hostPoolName, + String privateEndpointConnectionName, + PrivateEndpointConnection connection) { + PrivateEndpointConnectionWithSystemDataInner inner = + this + .serviceClient() + .updateByHostPool(resourceGroupName, hostPoolName, privateEndpointConnectionName, connection); + if (inner != null) { + return new PrivateEndpointConnectionWithSystemDataImpl(inner, this.manager()); + } else { + return null; + } + } + private PrivateEndpointConnectionsClient serviceClient() { return this.innerClient; } 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 index 366e5091e67f..c023b6f4cb74 100644 --- 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 @@ -56,34 +56,40 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource */ @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") - private interface PrivateLinkResourcesService { + public interface PrivateLinkResourcesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateLinkResources") + + "/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateLinkResources") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByHostPool( + Mono> listByWorkspace( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateLinkResources") + + "/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateLinkResources") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspace( + Mono> listByHostPool( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + @PathParam("hostPoolName") String hostPoolName, + @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); @@ -91,7 +97,7 @@ Mono> listByWorkspace( @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByHostPoolNext( + Mono> listByWorkspaceNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, @@ -101,7 +107,7 @@ Mono> listByHostPoolNext( @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspaceNext( + Mono> listByHostPoolNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, @@ -109,10 +115,13 @@ Mono> listByWorkspaceNext( } /** - * List the private link resources available for this hostpool. + * List the private link resources available for this workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -120,8 +129,8 @@ Mono> listByWorkspaceNext( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, String hostPoolName) { + private Mono> listByWorkspaceSinglePageAsync( + String resourceGroupName, String workspaceName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -138,20 +147,23 @@ private Mono> listByHostPoolSinglePageAs 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 (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 - .listByHostPool( + .listByWorkspace( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - hostPoolName, + workspaceName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -167,10 +179,13 @@ private Mono> listByHostPoolSinglePageAs } /** - * List the private link resources available for this hostpool. + * List the private link resources available for this workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -179,8 +194,13 @@ private Mono> listByHostPoolSinglePageAs * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, String hostPoolName, Context context) { + private Mono> listByWorkspaceSinglePageAsync( + String resourceGroupName, + String workspaceName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -197,18 +217,21 @@ private Mono> listByHostPoolSinglePageAs 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 (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 - .listByHostPool( + .listByWorkspace( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - hostPoolName, + workspaceName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -223,27 +246,54 @@ private Mono> listByHostPoolSinglePageAs } /** - * List the private link resources available for this hostpool. + * List the private link resources available for this workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private link resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName) { + public PagedFlux listByWorkspaceAsync( + String resourceGroupName, String workspaceName, Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName), - nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); + () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip), + nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); } /** - * List the private link resources available for this hostpool. + * List the private link resources available for this workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip), + nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); + } + + /** + * List the private link resources available for this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -251,33 +301,47 @@ public PagedFlux listByHostPoolAsync(String resourceGr * @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) { + private PagedFlux listByWorkspaceAsync( + String resourceGroupName, + String workspaceName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, context), - nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); + () -> + listByWorkspaceSinglePageAsync( + resourceGroupName, workspaceName, pageSize, isDescending, initialSkip, context), + nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); } /** - * List the private link resources available for this hostpool. + * List the private link resources available for this workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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 listByHostPool(String resourceGroupName, String hostPoolName) { - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, hostPoolName)); + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listByWorkspaceAsync(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip)); } /** - * List the private link resources available for this hostpool. + * List the private link resources available for this workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -285,16 +349,25 @@ public PagedIterable listByHostPool(String resourceGro * @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)); + public PagedIterable listByWorkspace( + String resourceGroupName, + String workspaceName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listByWorkspaceAsync(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip, context)); } /** - * List the private link resources available for this workspace. + * List the private link resources available for this hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -302,8 +375,8 @@ public PagedIterable listByHostPool( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync( - String resourceGroupName, String workspaceName) { + private Mono> listByHostPoolSinglePageAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -320,20 +393,23 @@ private Mono> listByWorkspaceSinglePageA 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 (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 - .listByWorkspace( + .listByHostPool( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, + hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -349,10 +425,13 @@ private Mono> listByWorkspaceSinglePageA } /** - * List the private link resources available for this workspace. + * List the private link resources available for this hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -361,8 +440,13 @@ private Mono> listByWorkspaceSinglePageA * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono> listByHostPoolSinglePageAsync( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -379,18 +463,21 @@ private Mono> listByWorkspaceSinglePageA 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 (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 - .listByWorkspace( + .listByHostPool( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, + hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -405,27 +492,54 @@ private Mono> listByWorkspaceSinglePageA } /** - * List the private link resources available for this workspace. + * List the private link resources available for this hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private link resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + public PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); + () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); } /** - * List the private link resources available for this workspace. + * List the private link resources available for this hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @param hostPoolName The name of the host pool within the specified resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); + } + + /** + * List the private link resources available for this hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -433,33 +547,47 @@ public PagedFlux listByWorkspaceAsync(String resourceG * @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) { + private PagedFlux listByHostPoolAsync( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); + () -> + listByHostPoolSinglePageAsync( + resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), + nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); } /** - * List the private link resources available for this workspace. + * List the private link resources available for this hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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 listByWorkspace(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName)); + public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip)); } /** - * List the private link resources available for this workspace. + * List the private link resources available for this hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -467,15 +595,22 @@ public PagedIterable listByWorkspace(String resourceGr * @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)); + public PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context)); } /** * Get the next page of items. * - * @param nextLink The 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. @@ -483,7 +618,7 @@ public PagedIterable listByWorkspace( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolNextSinglePageAsync(String nextLink) { + private Mono> listByWorkspaceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -495,7 +630,7 @@ private Mono> listByHostPoolNextSinglePa } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( res -> new PagedResponseBase<>( @@ -511,7 +646,8 @@ private Mono> listByHostPoolNextSinglePa /** * 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. @@ -520,7 +656,7 @@ private Mono> listByHostPoolNextSinglePa * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolNextSinglePageAsync( + private Mono> listByWorkspaceNextSinglePageAsync( String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -534,7 +670,7 @@ private Mono> listByHostPoolNextSinglePa final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context) + .listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context) .map( res -> new PagedResponseBase<>( @@ -549,7 +685,8 @@ private Mono> listByHostPoolNextSinglePa /** * 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. @@ -557,7 +694,7 @@ private Mono> listByHostPoolNextSinglePa * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(String nextLink) { + private Mono> listByHostPoolNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -569,7 +706,7 @@ private Mono> listByWorkspaceNextSingleP } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( res -> new PagedResponseBase<>( @@ -585,7 +722,8 @@ private Mono> listByWorkspaceNextSingleP /** * 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. @@ -594,7 +732,7 @@ private Mono> listByWorkspaceNextSingleP * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync( + private Mono> listByHostPoolNextSinglePageAsync( String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -608,7 +746,7 @@ private Mono> listByWorkspaceNextSingleP final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context) + .listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context) .map( res -> new PagedResponseBase<>( 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 index 9a481c35d18a..bf1f3ace3c3a 100644 --- 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 @@ -26,29 +26,43 @@ public PrivateLinkResourcesImpl( this.serviceManager = serviceManager; } - public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName) { + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { PagedIterable inner = - this.serviceClient().listByHostPool(resourceGroupName, hostPoolName); + this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } - public PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName, Context context) { + public PagedIterable listByWorkspace( + String resourceGroupName, + String workspaceName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { PagedIterable inner = - this.serviceClient().listByHostPool(resourceGroupName, hostPoolName, context); + this + .serviceClient() + .listByWorkspace(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { + public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName) { PagedIterable inner = - this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); + this.serviceClient().listByHostPool(resourceGroupName, hostPoolName); return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } - public PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName, Context context) { + public PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { PagedIterable inner = - this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); + this + .serviceClient() + .listByHostPool(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context); return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } 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 9c03244db659..0a9b66424d62 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 000000000000..7de704344ce7 --- /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 000000000000..a2fa55388845 --- /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") + public 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) + public Mono> getWithResponseAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a 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) + public 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) + public 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) + public 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) + public Mono> deleteWithResponseAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Remove a 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) + public 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) + public 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) + public 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) + public PagedFlux listAsync( + String resourceGroupName, String scalingPlanName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List 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) + public PagedFlux listAsync(String resourceGroupName, String scalingPlanName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List 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 000000000000..f9fa0d343303 --- /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 09f3893d56a8..655443fc0cdd 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 @@ -60,7 +60,7 @@ public final class ScalingPlansClientImpl implements ScalingPlansClient { */ @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") - private interface ScalingPlansService { + public interface ScalingPlansService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" @@ -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); @@ -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(); } /** @@ -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(); } /** @@ -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); } /** @@ -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) { + public 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) + public PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + /** * List scaling plans. * @@ -927,8 +951,11 @@ private Mono> listByResourceGroupSinglePageAsync */ @ServiceMethod(returns = ReturnType.COLLECTION) public 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( @@ -1065,6 +1119,24 @@ private Mono> listSinglePageAsync(Context contex null)); } + /** + * 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(Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(pageSize, isDescending, initialSkip), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + /** * List scaling plans in subscription. * @@ -1074,13 +1146,20 @@ private Mono> listSinglePageAsync(Context contex */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync() { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + () -> 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) + public PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); + } + /** * List scaling plan associated with hostpool. * @@ -1243,8 +1369,11 @@ private Mono> listByHostPoolSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName), + () -> 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 bf113f8629a7..4efb9b748a24 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 3b9a04dabd0f..ec92cef6f5dc 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 e6e74c542ee2..2cd6614e0fd2 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 @@ -59,7 +59,7 @@ public final class SessionHostsClientImpl implements SessionHostsClient { */ @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") - private interface SessionHostsService { + public interface SessionHostsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" @@ -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); @@ -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(); } /** @@ -404,25 +407,6 @@ private Mono> deleteWithResponseAsync( 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 ManagementException 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) { - return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force) - .flatMap(ignored -> Mono.empty()); - } - /** * Remove a SessionHost. * @@ -447,14 +431,17 @@ 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 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 void delete(String resourceGroupName, String hostPoolName, String sessionHostname) { - final Boolean force = null; - deleteAsync(resourceGroupName, hostPoolName, sessionHostname, force).block(); + public Response deleteWithResponse( + String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force, Context context) { + return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, context).block(); } /** @@ -463,17 +450,14 @@ public void delete(String resourceGroupName, String hostPoolName, String session * @param resourceGroupName The 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(); + public void delete(String resourceGroupName, String hostPoolName, String sessionHostname) { + final Boolean force = null; + deleteWithResponse(resourceGroupName, hostPoolName, sessionHostname, force, Context.NONE); } /** @@ -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) { + 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())); } @@ -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( @@ -803,6 +782,27 @@ private Mono> listSinglePageAsync( null)); } + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + /** * List sessionHosts. * @@ -815,8 +815,12 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync(String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, hostPoolName), nextLink -> listNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -824,6 +828,9 @@ 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. + * @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 0940d7b9fb2c..14fa001189c6 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 5327f63d85f9..f8feb72a2504 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 @@ -55,7 +55,7 @@ public final class StartMenuItemsClientImpl implements StartMenuItemsClient { */ @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") - private interface StartMenuItemsService { + public interface StartMenuItemsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" @@ -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( @@ -196,6 +220,31 @@ private Mono> listSinglePageAsync( null)); } + /** + * 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. + * @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, + 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. * @@ -208,8 +257,11 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public 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 d2e35c48f2c8..efd30a677bca 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 12fb21a25d7e..8a8d02e82cf2 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 @@ -59,7 +59,7 @@ public final class UserSessionsClientImpl implements UserSessionsClient { */ @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") - private interface UserSessionsService { + public interface UserSessionsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" @@ -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,6 +339,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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -317,9 +349,16 @@ private Mono> listByHostPoolSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName, String filter) { + 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)); } @@ -336,8 +375,13 @@ public PagedFlux listByHostPoolAsync( @ServiceMethod(returns = ReturnType.COLLECTION) public 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)); } /** @@ -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(); } /** @@ -692,26 +762,6 @@ private Mono> deleteWithResponseAsync( 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 ManagementException 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. * @@ -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) + public 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. * @@ -913,8 +1015,13 @@ private Mono> listSinglePageAsync( @ServiceMethod(returns = ReturnType.COLLECTION) public 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)); } /** @@ -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); } /** @@ -1286,7 +1418,6 @@ 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. @@ -1294,11 +1425,8 @@ private Mono> sendMessageWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono sendMessageAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - SendMessage sendMessage) { + 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 d42585135ed6..5630acfc5647 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 b97f285a3399..a8176e9298ae 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspaceImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspaceImpl.java @@ -8,6 +8,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan; @@ -105,6 +106,15 @@ public PublicNetworkAccess publicNetworkAccess() { return this.innerModel().publicNetworkAccess(); } + public List privateEndpointConnections() { + List inner = this.innerModel().privateEndpointConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public Region region() { return Region.fromName(this.regionName()); } 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 910baada107b..9951bb7ee99f 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 @@ -60,7 +60,7 @@ public final class WorkspacesClientImpl implements WorkspacesClient { */ @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") - private interface WorkspacesService { + public interface WorkspacesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" @@ -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); @@ -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(); } /** @@ -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(); } /** @@ -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); } /** @@ -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) { + public 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) + public PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + /** * List workspaces. * @@ -893,8 +912,11 @@ private Mono> listByResourceGroupSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public 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)); } /** @@ -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 613684ca1a44..d7ef068f04b0 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 000000000000..3f23da610e87 --- /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 000000000000..b82f435aa0e1 --- /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 a7234999167f..a82821fda101 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 fbd8aba315f1..6c2e29d502aa 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 bb3f17a9045b..61e0c0ad0f32 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 01b80cf202b7..e618394a9c5e 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"); @@ -16,6 +16,15 @@ public final class ApplicationGroupType extends ExpandableStringEnum 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 f1215bbd1f44..8b1f4ababfb2 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 3a17fb67da94..ffb452e260b5 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 ca1f830818a0..342b886848b4 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"); @@ -16,6 +16,15 @@ public final class ApplicationType extends ExpandableStringEnum /** Static value Desktop for ApplicationType. */ public static final ApplicationType DESKTOP = fromString("Desktop"); + /** + * Creates a new instance of ApplicationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ApplicationType() { + } + /** * Creates or finds a ApplicationType from its string representation. * 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 e1e5a9323400..e8576ae8e0e9 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 35b7c61aeff2..17fad5d97d9a 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"); @@ -19,6 +22,15 @@ public final class CommandLineSetting extends ExpandableStringEnumList 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 79720a92f7d4..6ff80cdfed02 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 d681456214c7..80e3c1c177a4 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 1338f404b054..178c8b8ad58a 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 2105588d953f..2ec1634405e8 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"); @@ -43,6 +43,15 @@ public final class HealthCheckName extends ExpandableStringEnum /** Static value AppAttachHealthCheck for HealthCheckName. */ public static final HealthCheckName APP_ATTACH_HEALTH_CHECK = fromString("AppAttachHealthCheck"); + /** + * Creates a new instance of HealthCheckName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HealthCheckName() { + } + /** * Creates or finds a HealthCheckName from its string representation. * 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 6ce4002a1c27..d5dd24f33c55 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"); @@ -22,6 +22,15 @@ public final class HealthCheckResult extends ExpandableStringEnum privateEndpointConnections(); /** * Gets the region of the resource. @@ -391,8 +400,8 @@ interface WithCreate DefinitionStages.WithSsoClientSecretKeyVaultPath, DefinitionStages.WithSsoSecretType, DefinitionStages.WithStartVMOnConnect, - DefinitionStages.WithMigrationRequest, - DefinitionStages.WithPublicNetworkAccess { + DefinitionStages.WithPublicNetworkAccess, + DefinitionStages.WithAgentUpdate { /** * Executes the create request. * @@ -620,16 +629,6 @@ interface WithStartVMOnConnect { */ WithCreate withStartVMOnConnect(Boolean startVMOnConnect); } - /** The stage of the HostPool 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); - } /** The stage of the HostPool definition allowing to specify publicNetworkAccess. */ interface WithPublicNetworkAccess { /** @@ -640,7 +639,19 @@ interface WithPublicNetworkAccess { * networks, Disabled allows this resource to only be accessed via private endpoints. * @return the next definition stage. */ - WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + WithCreate withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess); + } + /** The stage of the HostPool definition allowing to specify agentUpdate. */ + interface WithAgentUpdate { + /** + * Specifies the agentUpdate property: The session host configuration for updating agent, monitoring agent, + * and stack component.. + * + * @param agentUpdate The session host configuration for updating agent, monitoring agent, and stack + * component. + * @return the next definition stage. + */ + WithCreate withAgentUpdate(AgentUpdateProperties agentUpdate); } } /** @@ -669,7 +680,8 @@ interface Update UpdateStages.WithSsoSecretType, UpdateStages.WithPreferredAppGroupType, UpdateStages.WithStartVMOnConnect, - UpdateStages.WithPublicNetworkAccess { + UpdateStages.WithPublicNetworkAccess, + UpdateStages.WithAgentUpdate { /** * Executes the update request. * @@ -871,7 +883,19 @@ interface WithPublicNetworkAccess { * @param publicNetworkAccess Enabled to allow this resource to be access from the public network. * @return the next definition stage. */ - Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + Update withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess); + } + /** The stage of the HostPool update allowing to specify agentUpdate. */ + interface WithAgentUpdate { + /** + * Specifies the agentUpdate property: The session host configuration for updating agent, monitoring agent, + * and stack component.. + * + * @param agentUpdate The session host configuration for updating agent, monitoring agent, and stack + * component. + * @return the next definition stage. + */ + Update withAgentUpdate(AgentUpdatePatchProperties agentUpdate); } } /** @@ -892,20 +916,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 0d08faccf23a..bd83fe63e797 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 25303e17b023..3732c02ff16f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolPatch.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolPatch.java @@ -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. * @@ -434,7 +438,7 @@ public HostPoolPatch withStartVMOnConnect(Boolean startVMOnConnect) { * * @return the publicNetworkAccess value. */ - public PublicNetworkAccess publicNetworkAccess() { + public HostpoolPublicNetworkAccess publicNetworkAccess() { return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); } @@ -444,7 +448,7 @@ public PublicNetworkAccess publicNetworkAccess() { * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the HostPoolPatch object itself. */ - public HostPoolPatch withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + public HostPoolPatch withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess) { if (this.innerProperties() == null) { this.innerProperties = new HostPoolPatchProperties(); } @@ -452,6 +456,31 @@ public HostPoolPatch withPublicNetworkAccess(PublicNetworkAccess publicNetworkAc return this; } + /** + * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. + * + * @return the agentUpdate value. + */ + public AgentUpdatePatchProperties agentUpdate() { + return this.innerProperties() == null ? null : this.innerProperties().agentUpdate(); + } + + /** + * Set the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. + * + * @param agentUpdate the agentUpdate value to set. + * @return the HostPoolPatch object itself. + */ + public HostPoolPatch withAgentUpdate(AgentUpdatePatchProperties agentUpdate) { + if (this.innerProperties() == null) { + this.innerProperties = new HostPoolPatchProperties(); + } + this.innerProperties().withAgentUpdate(agentUpdate); + return this; + } + /** * Validates the instance. * 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 5e666c99fa3f..e93b31ff7770 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolProperties.java @@ -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. * @@ -164,7 +157,23 @@ public interface HostPoolProperties { * * @return the publicNetworkAccess value. */ - PublicNetworkAccess publicNetworkAccess(); + HostpoolPublicNetworkAccess publicNetworkAccess(); + + /** + * Gets the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack + * component. + * + * @return the agentUpdate value. + */ + AgentUpdateProperties agentUpdate(); + + /** + * Gets the privateEndpointConnections property: List of private endpoint connection associated with the specified + * resource. + * + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); /** * Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.HostPoolPropertiesInner object. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolType.java index 1c7d5b4b874a..ae2946370f8f 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"); @@ -19,6 +19,15 @@ public final class HostPoolType extends ExpandableStringEnum { /** Static value BYODesktop for HostPoolType. */ public static final HostPoolType BYODESKTOP = fromString("BYODesktop"); + /** + * Creates a new instance of HostPoolType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HostPoolType() { + } + /** * Creates or finds a HostPoolType from its string representation. * 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 a93ff1737413..71be49d892fa 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/HostpoolPublicNetworkAccess.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostpoolPublicNetworkAccess.java new file mode 100644 index 000000000000..57801eb24489 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostpoolPublicNetworkAccess.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to + * only be accessed via private endpoints. + */ +public final class HostpoolPublicNetworkAccess extends ExpandableStringEnum { + /** Static value Enabled for HostpoolPublicNetworkAccess. */ + public static final HostpoolPublicNetworkAccess ENABLED = fromString("Enabled"); + + /** Static value Disabled for HostpoolPublicNetworkAccess. */ + public static final HostpoolPublicNetworkAccess DISABLED = fromString("Disabled"); + + /** Static value EnabledForSessionHostsOnly for HostpoolPublicNetworkAccess. */ + public static final HostpoolPublicNetworkAccess ENABLED_FOR_SESSION_HOSTS_ONLY = + fromString("EnabledForSessionHostsOnly"); + + /** Static value EnabledForClientsOnly for HostpoolPublicNetworkAccess. */ + public static final HostpoolPublicNetworkAccess ENABLED_FOR_CLIENTS_ONLY = fromString("EnabledForClientsOnly"); + + /** + * Creates a new instance of HostpoolPublicNetworkAccess value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HostpoolPublicNetworkAccess() { + } + + /** + * Creates or finds a HostpoolPublicNetworkAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding HostpoolPublicNetworkAccess. + */ + @JsonCreator + public static HostpoolPublicNetworkAccess fromString(String name) { + return fromString(name, HostpoolPublicNetworkAccess.class); + } + + /** + * Gets known HostpoolPublicNetworkAccess values. + * + * @return known HostpoolPublicNetworkAccess values. + */ + public static Collection values() { + return values(HostpoolPublicNetworkAccess.class); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Identity.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Identity.java index a293bfd01f68..d78b5907e0d8 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 fcdffd98c88f..56c996f1f731 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"); @@ -19,6 +19,15 @@ public final class LoadBalancerType extends ExpandableStringEnumList 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 dd3483002571..46862b3d1d56 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 e7ad18a36b3a..e06a6c922485 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 4b5dac16ac04..000000000000 --- 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 7938c4508fde..d7fa4eab2a5f 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 24b0f6242882..6a55f93b23e8 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"); @@ -16,6 +16,15 @@ public final class PersonalDesktopAssignmentType extends ExpandableStringEnum { /** Static value None for PreferredAppGroupType. */ public static final PreferredAppGroupType NONE = fromString("None"); @@ -19,6 +19,15 @@ public final class PreferredAppGroupType extends ExpandableStringEnum { /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ @@ -23,6 +23,15 @@ public final class PrivateEndpointConnectionProvisioningState /** Static value Failed for PrivateEndpointConnectionProvisioningState. */ public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); + /** + * Creates a new instance of PrivateEndpointConnectionProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointConnectionProvisioningState() { + } + /** * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. * 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 index 0d1c6c2e8a81..e2fad3ebdb73 100644 --- 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 @@ -11,24 +11,24 @@ /** Resource collection API of PrivateEndpointConnections. */ public interface PrivateEndpointConnections { /** - * List private endpoint connections associated with hostpool. + * List private endpoint connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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 listByHostPool( - String resourceGroupName, String hostPoolName); + PagedIterable listByWorkspace( + String resourceGroupName, String workspaceName); /** - * List private endpoint connections associated with hostpool. + * List private endpoint connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. @@ -36,128 +36,131 @@ PagedIterable listByHostPool( * @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); + 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 hostPoolName The name of the host pool within the specified resource group. + * @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. + * @return a private endpoint connection along with {@link Response}. */ - PrivateEndpointConnectionWithSystemData getByHostPool( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + Response getByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); /** * Get a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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}. + * @return a private endpoint connection. */ - Response getByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); + PrivateEndpointConnectionWithSystemData getByWorkspace( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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}. */ - void deleteByHostPool(String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + Response deleteByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); /** * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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 deleteByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); + void deleteByWorkspace(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** * Approve or reject a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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. + * @return the Private Endpoint Connection resource along with {@link Response}. */ - PrivateEndpointConnectionWithSystemData updateByHostPool( + Response updateByWorkspaceWithResponse( String resourceGroupName, - String hostPoolName, + String workspaceName, String privateEndpointConnectionName, - PrivateEndpointConnection connection); + PrivateEndpointConnection connection, + Context context); /** * Approve or reject a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @param 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}. + * @return the Private Endpoint Connection resource. */ - Response updateByHostPoolWithResponse( + PrivateEndpointConnectionWithSystemData updateByWorkspace( String resourceGroupName, - String hostPoolName, + String workspaceName, String privateEndpointConnectionName, - PrivateEndpointConnection connection, - Context context); + PrivateEndpointConnection connection); /** - * List private endpoint connections. + * List private endpoint connections associated with hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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 listByWorkspace( - String resourceGroupName, String workspaceName); + PagedIterable listByHostPool( + String resourceGroupName, String hostPoolName); /** - * List private endpoint connections. + * List private endpoint connections associated with hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. @@ -165,106 +168,111 @@ PagedIterable listByWorkspace( * @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); + PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * Get a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. + * @return a private endpoint connection along with {@link Response}. */ - PrivateEndpointConnectionWithSystemData getByWorkspace( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + Response getByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); /** * Get a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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}. + * @return a private endpoint connection. */ - Response getByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + PrivateEndpointConnectionWithSystemData getByHostPool( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); /** * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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}. */ - void deleteByWorkspace(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + Response deleteByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); /** * Remove a connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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 deleteByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + void deleteByHostPool(String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); /** * Approve or reject a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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. + * @return the Private Endpoint Connection resource along with {@link Response}. */ - PrivateEndpointConnectionWithSystemData updateByWorkspace( + Response updateByHostPoolWithResponse( String resourceGroupName, - String workspaceName, + String hostPoolName, String privateEndpointConnectionName, - PrivateEndpointConnection connection); + PrivateEndpointConnection connection, + Context context); /** * Approve or reject a private endpoint connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @param 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}. + * @return the Private Endpoint Connection resource. */ - Response updateByWorkspaceWithResponse( + PrivateEndpointConnectionWithSystemData updateByHostPool( String resourceGroupName, - String workspaceName, + String hostPoolName, String privateEndpointConnectionName, - PrivateEndpointConnection connection, - Context context); + PrivateEndpointConnection connection); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointServiceConnectionStatus.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointServiceConnectionStatus.java index 816b053c362d..0dc90042b176 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PrivateEndpointServiceConnectionStatus. */ +/** The private endpoint connection status. */ public final class PrivateEndpointServiceConnectionStatus extends ExpandableStringEnum { /** Static value Pending for PrivateEndpointServiceConnectionStatus. */ @@ -20,6 +20,15 @@ public final class PrivateEndpointServiceConnectionStatus /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */ public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); + /** + * Creates a new instance of PrivateEndpointServiceConnectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointServiceConnectionStatus() { + } + /** * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResourceListResult.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResourceListResult.java index dd0576a016c3..24165f968933 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/PrivateLinkResourceListResult.java @@ -24,6 +24,10 @@ public final class PrivateLinkResourceListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of PrivateLinkResourceListResult class. */ + public PrivateLinkResourceListResult() { + } + /** * Get the value property: Array of private link resources. * 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 index 95ff8296e2b0..c80034b42a09 100644 --- 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 @@ -10,52 +10,70 @@ /** Resource collection API of PrivateLinkResources. */ public interface PrivateLinkResources { /** - * List the private link resources available for this hostpool. + * List the private link resources available for this workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @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 listByHostPool(String resourceGroupName, String hostPoolName); + PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); /** - * List the private link resources available for this hostpool. + * List the private link resources available for this workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. + * @param workspaceName The name of the workspace. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private link resources as paginated response with {@link PagedIterable}. */ - PagedIterable listByHostPool(String resourceGroupName, String hostPoolName, Context context); + PagedIterable listByWorkspace( + String resourceGroupName, + String workspaceName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** - * List the private link resources available for this workspace. + * List the private link resources available for this hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @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 listByWorkspace(String resourceGroupName, String workspaceName); + PagedIterable listByHostPool(String resourceGroupName, String hostPoolName); /** - * List the private link resources available for this workspace. + * List the private link resources available for this hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private link resources as paginated response with {@link PagedIterable}. */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, 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/models/PrivateLinkServiceConnectionState.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkServiceConnectionState.java index 03e22215f9ff..8c448bf0dcdd 100644 --- 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 @@ -11,8 +11,7 @@ @Fluent public final class PrivateLinkServiceConnectionState { /* - * Indicates whether the connection has been Approved/Rejected/Removed by - * the owner of the service. + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ @JsonProperty(value = "status") private PrivateEndpointServiceConnectionStatus status; @@ -24,12 +23,15 @@ public final class PrivateLinkServiceConnectionState { private String description; /* - * A message indicating if changes on the service provider require any - * updates on the consumer. + * A message indicating if changes on the service provider require any updates on the consumer. */ @JsonProperty(value = "actionsRequired") private String actionsRequired; + /** Creates an instance of PrivateLinkServiceConnectionState class. */ + public PrivateLinkServiceConnectionState() { + } + /** * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the * service. 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 index a18351182183..40edec9b3e16 100644 --- 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 @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for 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. + */ public final class PublicNetworkAccess extends ExpandableStringEnum { /** Static value Enabled for PublicNetworkAccess. */ public static final PublicNetworkAccess ENABLED = fromString("Enabled"); @@ -16,6 +19,15 @@ public final class PublicNetworkAccess extends ExpandableStringEnum { /** Static value Delete for RegistrationTokenOperation. */ public static final RegistrationTokenOperation DELETE = fromString("Delete"); @@ -19,6 +19,15 @@ public final class RegistrationTokenOperation extends ExpandableStringEnum { /** Static value InBuilt for RemoteApplicationType. */ public static final RemoteApplicationType IN_BUILT = fromString("InBuilt"); @@ -16,6 +16,15 @@ public final class RemoteApplicationType extends ExpandableStringEnum { /** Static value Pooled for ScalingHostPoolType. */ public static final ScalingHostPoolType POOLED = fromString("Pooled"); + /** + * Creates a new instance of ScalingHostPoolType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScalingHostPoolType() { + } + /** * Creates or finds a ScalingHostPoolType from its string representation. * 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 29cf7b1e4b47..f20d464d6df4 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 a47d5f332761..b27ef7c0f7f9 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 4750a92d501d..381e4a076f8c 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 000000000000..9501a7780c9a --- /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/ScalingPlanPooledScheduleList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledScheduleList.java new file mode 100644 index 000000000000..ef6ffd32c6f8 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledScheduleList.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * ScalingPlanPooledScheduleList + * + *

List of ScalingPlanPooledSchedule definitions. + */ +@Fluent +public final class ScalingPlanPooledScheduleList { + /* + * List of ScalingPlanPooledSchedule definitions. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next page of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of ScalingPlanPooledScheduleList class. */ + public ScalingPlanPooledScheduleList() { + } + + /** + * Get the value property: List of ScalingPlanPooledSchedule definitions. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of ScalingPlanPooledSchedule definitions. + * + * @param value the value value to set. + * @return the ScalingPlanPooledScheduleList object itself. + */ + public ScalingPlanPooledScheduleList 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/ScalingPlanPooledSchedulePatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedulePatch.java new file mode 100644 index 000000000000..ac5373c62d05 --- /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 000000000000..282d38e9b4b5 --- /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 9bffab47ed23..efce89a0a941 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 d2fd0b152e47..dcf2877f4783 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/ScalingScheduleDaysOfWeekItem.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingScheduleDaysOfWeekItem.java index c8e319e1b71c..cac2d85a606c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingScheduleDaysOfWeekItem.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingScheduleDaysOfWeekItem.java @@ -31,6 +31,15 @@ public final class ScalingScheduleDaysOfWeekItem extends ExpandableStringEnum 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 6ddf0409b52c..7dcc7ec093a1 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 000000000000..4d5a713f129e --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostComponentUpdateType.java @@ -0,0 +1,47 @@ +// Copyright (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 a new instance of SessionHostComponentUpdateType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SessionHostComponentUpdateType() { + } + + /** + * 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 e4a8baf041ff..a230bae92728 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 70e398b34c0e..ffbb3359e9f4 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 e96f03f2685e..98ee565fd7b3 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 ea1ea4931296..bc274fcd51dd 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"); @@ -16,6 +16,15 @@ public final class SessionHostLoadBalancingAlgorithm extends ExpandableStringEnu /** Static value DepthFirst for SessionHostLoadBalancingAlgorithm. */ public static final SessionHostLoadBalancingAlgorithm DEPTH_FIRST = fromString("DepthFirst"); + /** + * Creates a new instance of SessionHostLoadBalancingAlgorithm value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SessionHostLoadBalancingAlgorithm() { + } + /** * Creates or finds a SessionHostLoadBalancingAlgorithm from its string representation. * 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 3eb64d18cf78..50376b094467 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 8282d05ddfcd..ca698cfc8556 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 c9c1efca1f9e..9968941080de 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"); @@ -28,6 +28,15 @@ public final class SessionState extends ExpandableStringEnum { /** Static value UserProfileDiskMounted for SessionState. */ public static final SessionState USER_PROFILE_DISK_MOUNTED = fromString("UserProfileDiskMounted"); + /** + * Creates a new instance of SessionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SessionState() { + } + /** * Creates or finds a SessionState from its string representation. * 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 a543a91c3fbc..f16cc2cafcf6 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 faace1779957..b65dbcdc83eb 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 462580bc0220..68ffd472b759 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"); @@ -22,6 +22,15 @@ public final class SsoSecretType extends ExpandableStringEnum { /** Static value CertificateInKeyVault for SsoSecretType. */ public static final SsoSecretType CERTIFICATE_IN_KEY_VAULT = fromString("CertificateInKeyVault"); + /** + * Creates a new instance of SsoSecretType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SsoSecretType() { + } + /** * Creates or finds a SsoSecretType from its string representation. * 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 feb770a1ecee..16872bbd23db 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 60c432a84df8..8d9977a8b98d 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 b2fcc115408b..db11425a6d49 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"); @@ -46,6 +46,15 @@ public final class Status extends ExpandableStringEnum { /** Static value NeedsAssistance for Status. */ public static final Status NEEDS_ASSISTANCE = fromString("NeedsAssistance"); + /** + * Creates a new instance of Status value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Status() { + } + /** * Creates or finds a Status from its string representation. * 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 0bfe4a6e3aab..d053925b9797 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"); @@ -16,6 +16,15 @@ public final class StopHostsWhen extends ExpandableStringEnum { /** Static value ZeroActiveSessions for StopHostsWhen. */ public static final StopHostsWhen ZERO_ACTIVE_SESSIONS = fromString("ZeroActiveSessions"); + /** + * Creates a new instance of StopHostsWhen value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StopHostsWhen() { + } + /** * Creates or finds a StopHostsWhen from its string representation. * 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 8f2d8a771369..8e06cf5d8cfc 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 aed79e978f51..a0f4d84110cf 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"); @@ -25,6 +25,15 @@ public final class UpdateState extends ExpandableStringEnum { /** Static value Failed for UpdateState. */ public static final UpdateState FAILED = fromString("Failed"); + /** + * Creates a new instance of UpdateState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UpdateState() { + } + /** * Creates or finds a UpdateState from its string representation. * 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 cf387cc9975c..b46192c4d4d3 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 e187799880ec..035c3aca7b26 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 eff55777e1f3..14840999ecbd 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 @@ -147,6 +147,14 @@ public interface Workspace { */ PublicNetworkAccess publicNetworkAccess(); + /** + * Gets the privateEndpointConnections property: List of private endpoint connection associated with the specified + * resource. + * + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); + /** * Gets the region of the resource. * 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 999aa194734f..318ca2db9a64 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 95718ba3661c..a2c2849e2ee5 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/WorkspacePatch.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/WorkspacePatch.java @@ -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. * 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 78b3a153138d..be4529a32ef8 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 52f2134999d6..83d6cd1c306e 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/preview/2022-10-14-preview/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 1eb409b24342..318d176d3200 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/ApplicationGroup_Delete.json */ /** * Sample code: ApplicationGroup_Delete. @@ -18,6 +16,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", com.azure.core.util.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 2ccf2d393cd8..d6758b3d9a5e 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/ApplicationGroup_Get.json */ /** * Sample code: ApplicationGroup_Get. @@ -18,6 +16,8 @@ public final class ApplicationGroupsGetByResourceGroupSamples { */ public static void applicationGroupGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applicationGroups().getByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", Context.NONE); + manager + .applicationGroups() + .getByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", com.azure.core.util.Context.NONE); } } 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 24de765ad64f..329e101fdd71 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/ApplicationGroup_ListByResourceGroup.json */ /** * Sample code: ApplicationGroup_ListByResourceGroup. @@ -20,6 +18,12 @@ 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, + com.azure.core.util.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 e1d1a1a960d3..bea2761aae25 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/ApplicationGroup_ListBySubscription.json */ /** * Sample code: ApplicationGroup_List. @@ -18,6 +16,6 @@ public final class ApplicationGroupsListSamples { */ public static void applicationGroupList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applicationGroups().list("applicationGroupType eq 'RailApplication'", Context.NONE); + manager.applicationGroups().list("applicationGroupType eq 'RailApplication'", com.azure.core.util.Context.NONE); } } 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 f2fa4c53d032..58f7eed62f7c 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 @@ -4,7 +4,6 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroup; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,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/preview/2022-10-14-preview/examples/ApplicationGroup_Update.json */ /** * Sample code: ApplicationGroups_Update. @@ -24,7 +23,7 @@ public static void applicationGroupsUpdate( ApplicationGroup resource = manager .applicationGroups() - .getByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", Context.NONE) + .getByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", com.azure.core.util.Context.NONE) .getValue(); resource .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 c2c5fd9b1e0d..c49bdbcd02ea 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/preview/2022-10-14-preview/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 c099b559d7f4..1c3019a06000 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/Application_Delete.json */ /** * Sample code: Application_Delete. @@ -18,6 +16,9 @@ public final class ApplicationsDeleteSamples { */ public static void applicationDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applications().deleteWithResponse("resourceGroup1", "applicationGroup1", "application1", Context.NONE); + manager + .applications() + .deleteWithResponse( + "resourceGroup1", "applicationGroup1", "application1", com.azure.core.util.Context.NONE); } } 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 3a2b9c760654..11f6057c29a8 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/Application_Get.json */ /** * Sample code: Application_Get. @@ -18,6 +16,8 @@ public final class ApplicationsGetSamples { */ public static void applicationGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applications().getWithResponse("resourceGroup1", "applicationGroup1", "application1", Context.NONE); + manager + .applications() + .getWithResponse("resourceGroup1", "applicationGroup1", "application1", com.azure.core.util.Context.NONE); } } 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 3d7b03f696fe..7bed866e5e04 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/Application_List.json */ /** * Sample code: Applications_List. @@ -18,6 +16,8 @@ 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, com.azure.core.util.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 46c663075cdc..4db3d1e96a19 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 @@ -4,7 +4,6 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.models.Application; import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; @@ -12,7 +11,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/preview/2022-10-14-preview/examples/Application_Update.json */ /** * Sample code: Application_Update. @@ -24,7 +23,8 @@ public static void applicationUpdate( Application resource = manager .applications() - .getWithResponse("resourceGroup1", "applicationGroup1", "application1", Context.NONE) + .getWithResponse( + "resourceGroup1", "applicationGroup1", "application1", com.azure.core.util.Context.NONE) .getValue(); resource .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 37d3d65196ee..769a59bcd7cb 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/Desktop_Get.json */ /** * Sample code: Desktop_Get. @@ -18,6 +16,8 @@ public final class DesktopsGetSamples { */ public static void desktopGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.desktops().getWithResponse("resourceGroup1", "applicationGroup1", "SessionDesktop", Context.NONE); + manager + .desktops() + .getWithResponse("resourceGroup1", "applicationGroup1", "SessionDesktop", com.azure.core.util.Context.NONE); } } 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 5a62924a11d9..d8b5da6b87d6 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/Desktop_List.json */ /** * Sample code: Desktop_List. @@ -18,6 +16,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, com.azure.core.util.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 b2f8158a5d75..a59c4bd024b5 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 @@ -4,13 +4,12 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -import com.azure.core.util.Context; 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/preview/2022-10-14-preview/examples/Desktop_Update.json */ /** * Sample code: Desktop_Update. @@ -26,6 +25,6 @@ public static void desktopUpdate( "applicationGroup1", "SessionDesktop", new DesktopPatch().withDescription("des1").withFriendlyName("friendly"), - Context.NONE); + com.azure.core.util.Context.NONE); } } 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 ae2237890153..2a7428f531aa 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/preview/2022-10-14-preview/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 4048e8b50996..f25f6fce116d 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/HostPool_Delete.json */ /** * Sample code: HostPool_Delete. @@ -18,6 +16,6 @@ public final class HostPoolsDeleteSamples { */ public static void hostPoolDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.hostPools().deleteWithResponse("resourceGroup1", "hostPool1", true, Context.NONE); + manager.hostPools().deleteWithResponse("resourceGroup1", "hostPool1", true, com.azure.core.util.Context.NONE); } } 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 73be37854039..f9b730aa3417 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/HostPool_Get.json */ /** * Sample code: HostPool_Get. @@ -18,6 +16,8 @@ public final class HostPoolsGetByResourceGroupSamples { */ public static void hostPoolGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.hostPools().getByResourceGroupWithResponse("resourceGroup1", "hostPool1", Context.NONE); + manager + .hostPools() + .getByResourceGroupWithResponse("resourceGroup1", "hostPool1", com.azure.core.util.Context.NONE); } } 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 57b3331bdc4d..ede7091acefd 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/HostPool_ListByResourceGroup.json */ /** * Sample code: HostPool_ListByResourceGroup. @@ -18,6 +16,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, com.azure.core.util.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 7f31eba0b35d..f5c5bb95ad23 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/HostPool_List.json */ /** * Sample code: HostPool_List. @@ -18,6 +16,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, com.azure.core.util.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 1217d7455f89..ef996844be6c 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/HostPools_RetrieveRegistrationToken_Post.json */ /** * Sample code: HostPools_RetrieveRegistrationToken_Post. @@ -18,6 +16,8 @@ public final class HostPoolsRetrieveRegistrationTokenSamples { */ public static void hostPoolsRetrieveRegistrationTokenPost( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.hostPools().retrieveRegistrationTokenWithResponse("resourceGroup1", "hostPool1", Context.NONE); + manager + .hostPools() + .retrieveRegistrationTokenWithResponse("resourceGroup1", "hostPool1", com.azure.core.util.Context.NONE); } } 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 8a2d17b55fa6..6c83a3da87cd 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 @@ -4,22 +4,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/preview/2022-10-14-preview/examples/HostPool_Update.json */ /** * Sample code: HostPool_Update. @@ -29,7 +32,10 @@ public final class HostPoolsUpdateSamples { public static void hostPoolUpdate( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { HostPool resource = - manager.hostPools().getByResourceGroupWithResponse("resourceGroup1", "hostPool1", Context.NONE).getValue(); + manager + .hostPools() + .getByResourceGroupWithResponse("resourceGroup1", "hostPool1", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withTags(mapOf("tag1", "value1", "tag2", "value2")) @@ -48,7 +54,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 d2029ac6ce98..e15cc06c40e2 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 @@ -4,13 +4,12 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -import com.azure.core.util.Context; 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/preview/2022-10-14-preview/examples/MsixImage_Expand_Post.json */ /** * Sample code: MsixImage_Expand. @@ -21,6 +20,10 @@ public static void msixImageExpand( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .msixImages() - .expand("resourceGroup1", "hostpool1", new MsixImageUri().withUri("imagepath"), Context.NONE); + .expand( + "resourceGroup1", + "hostpool1", + new MsixImageUri().withUri("imagepath"), + com.azure.core.util.Context.NONE); } } 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 6e8ce1c8d30a..307a2c68365a 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/preview/2022-10-14-preview/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 a55af6ce4dfb..68354a506997 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/MsixPackage_Delete.json */ /** * Sample code: MSIXPackage_Delete. @@ -18,6 +16,8 @@ public final class MsixPackagesDeleteSamples { */ public static void mSIXPackageDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.msixPackages().deleteWithResponse("resourceGroup1", "hostpool1", "packagefullname", Context.NONE); + manager + .msixPackages() + .deleteWithResponse("resourceGroup1", "hostpool1", "packagefullname", com.azure.core.util.Context.NONE); } } 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 be0b911b0b24..2bf26083cff0 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/MsixPackage_Get.json */ /** * Sample code: MSIXPackage_Get. @@ -18,6 +16,8 @@ public final class MsixPackagesGetSamples { */ public static void mSIXPackageGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.msixPackages().getWithResponse("resourceGroup1", "hostpool1", "packagefullname", Context.NONE); + manager + .msixPackages() + .getWithResponse("resourceGroup1", "hostpool1", "packagefullname", com.azure.core.util.Context.NONE); } } 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 dbc4807f2cec..58ff0fd515d6 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/MsixPackage_List.json */ /** * Sample code: MSIXPackage_List. @@ -18,6 +16,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, com.azure.core.util.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 3e619e183249..715713a5788d 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 @@ -4,13 +4,12 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -import com.azure.core.util.Context; 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/preview/2022-10-14-preview/examples/MsixPackage_Update.json */ /** * Sample code: MSIXPackage_Update. @@ -22,7 +21,7 @@ public static void mSIXPackageUpdate( MsixPackage resource = manager .msixPackages() - .getWithResponse("resourceGroup1", "hostpool1", "msixpackagefullname", Context.NONE) + .getWithResponse("resourceGroup1", "hostpool1", "msixpackagefullname", com.azure.core.util.Context.NONE) .getValue(); resource.update().withIsActive(true).withIsRegularRegistration(false).withDisplayName("displayname").apply(); } 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 8792a0645ed7..3ff7d3cf0a28 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/OperationDescription_List.json */ /** * Sample code: OperationDescription_List. @@ -18,6 +16,6 @@ public final class OperationsListSamples { */ public static void operationDescriptionList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } 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 index 8f2d1a9f635b..0e3eac8fdb41 100644 --- 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 @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_DeleteByHostPool.json */ /** * Sample code: PrivateEndpointConnection_DeleteByHostPool. @@ -21,6 +19,9 @@ public static void privateEndpointConnectionDeleteByHostPool( manager .privateEndpointConnections() .deleteByHostPoolWithResponse( - "resourceGroup1", "hostPool1", "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", Context.NONE); + "resourceGroup1", + "hostPool1", + "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceSamples.java index d0164d11ef98..6851fd766ef3 100644 --- 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 @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_DeleteByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_DeleteByWorkspace. @@ -21,6 +19,9 @@ public static void privateEndpointConnectionDeleteByWorkspace( manager .privateEndpointConnections() .deleteByWorkspaceWithResponse( - "resourceGroup1", "workspace1", "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", Context.NONE); + "resourceGroup1", + "workspace1", + "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolSamples.java index 9e0d97c52a8e..0824c674e172 100644 --- 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 @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_GetByHostPool.json */ /** * Sample code: PrivateEndpointConnection_GetByHostPool. @@ -21,6 +19,9 @@ public static void privateEndpointConnectionGetByHostPool( manager .privateEndpointConnections() .getByHostPoolWithResponse( - "resourceGroup1", "hostPool1", "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", Context.NONE); + "resourceGroup1", + "hostPool1", + "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceSamples.java index 96e1177c3efe..adc4a06c87fc 100644 --- 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 @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_GetByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_GetByWorkspace. @@ -21,6 +19,9 @@ public static void privateEndpointConnectionGetByWorkspace( manager .privateEndpointConnections() .getByWorkspaceWithResponse( - "resourceGroup1", "workspace1", "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", Context.NONE); + "resourceGroup1", + "workspace1", + "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolSamples.java index 306a7c2ed5ca..cbb70fa4a935 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/PrivateEndpointConnectionsListByHostPoolSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_ListByHostPool.json */ /** * Sample code: PrivateEndpointConnection_ListByHostPool. @@ -18,6 +16,8 @@ public final class PrivateEndpointConnectionsListByHostPoolSamples { */ public static void privateEndpointConnectionListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.privateEndpointConnections().listByHostPool("resourceGroup1", "hostPool1", Context.NONE); + manager + .privateEndpointConnections() + .listByHostPool("resourceGroup1", "hostPool1", null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceSamples.java index 3b5f80d6e661..6df976d5557b 100644 --- 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 @@ -4,12 +4,10 @@ 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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_ListByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_ListByWorkspace. @@ -18,6 +16,8 @@ public final class PrivateEndpointConnectionsListByWorkspaceSamples { */ public static void privateEndpointConnectionListByWorkspace( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.privateEndpointConnections().listByWorkspace("resourceGroup1", "workspace1", Context.NONE); + manager + .privateEndpointConnections() + .listByWorkspace("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolSamples.java index de5eb44b36ed..34f418eff36f 100644 --- 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 @@ -4,7 +4,6 @@ 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; @@ -12,7 +11,7 @@ /** 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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_UpdateByHostPool.json */ /** * Sample code: PrivateEndpointConnection_UpdateByHostPool. @@ -33,6 +32,6 @@ public static void privateEndpointConnectionUpdateByHostPool( .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) .withDescription("Approved by admin@consoto.com") .withActionsRequired("None")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceSamples.java index a9919b9c6f4c..fdb1de54e003 100644 --- 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 @@ -4,7 +4,6 @@ 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; @@ -12,7 +11,7 @@ /** 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 + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/PrivateEndpointConnection_UpdateByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_UpdateByWorkspace. @@ -33,6 +32,6 @@ public static void privateEndpointConnectionUpdateByWorkspace( .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) .withDescription("Approved by admin@consoto.com") .withActionsRequired("None")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolSamples.java index 32f1999f4841..eefe315deb5f 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/PrivateLinkResourcesListByHostPoolSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -import com.azure.core.util.Context; - /** Samples for PrivateLinkResources ListByHostPool. */ public final class PrivateLinkResourcesListByHostPoolSamples { /* - * 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/preview/2022-10-14-preview/examples/PrivateLinkResources_ListByHostPool.json */ /** * Sample code: PrivateLinkResources_ListByHostPool. @@ -18,6 +16,8 @@ public final class PrivateLinkResourcesListByHostPoolSamples { */ public static void privateLinkResourcesListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.privateLinkResources().listByHostPool("resourceGroup1", "hostPool1", Context.NONE); + manager + .privateLinkResources() + .listByHostPool("resourceGroup1", "hostPool1", null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceSamples.java index d54a4ac04685..18d0c0e3839a 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/PrivateLinkResourcesListByWorkspaceSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -import com.azure.core.util.Context; - /** Samples for PrivateLinkResources ListByWorkspace. */ public final class PrivateLinkResourcesListByWorkspaceSamples { /* - * 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/preview/2022-10-14-preview/examples/PrivateLinkResources_ListByWorkspace.json */ /** * Sample code: PrivateLinkResources_ListByWorkspace. @@ -18,6 +16,8 @@ public final class PrivateLinkResourcesListByWorkspaceSamples { */ public static void privateLinkResourcesListByWorkspace( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.privateLinkResources().listByWorkspace("resourceGroup1", "workspace1", Context.NONE); + manager + .privateLinkResources() + .listByWorkspace("resourceGroup1", "workspace1", null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateSamples.java new file mode 100644 index 000000000000..f10aeec23079 --- /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/preview/2022-10-14-preview/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/ScalingPlanPooledSchedulesDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java new file mode 100644 index 000000000000..8cee68873c0c --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** Samples for ScalingPlanPooledSchedules Delete. */ +public final class ScalingPlanPooledSchedulesDeleteSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlanPooledSchedule_Delete.json + */ + /** + * Sample code: ScalingPlanPooledSchedules_Delete. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPooledSchedulesDelete( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPooledSchedules() + .deleteWithResponse( + "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java new file mode 100644 index 000000000000..8c497fd46b3e --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** Samples for ScalingPlanPooledSchedules Get. */ +public final class ScalingPlanPooledSchedulesGetSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlanPooledSchedule_Get.json + */ + /** + * Sample code: ScalingPlanPooledSchedules_Get. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPooledSchedulesGet( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPooledSchedules() + .getWithResponse( + "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java new file mode 100644 index 000000000000..65490a1cbbfb --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** Samples for ScalingPlanPooledSchedules List. */ +public final class ScalingPlanPooledSchedulesListSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlanPooledSchedule_List.json + */ + /** + * Sample code: ScalingPlanPooledSchedules_List. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void scalingPlanPooledSchedulesList( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager + .scalingPlanPooledSchedules() + .list("resourceGroup1", "scalingPlan1", 10, true, 0, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java new file mode 100644 index 000000000000..d67ea8102103 --- /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.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/preview/2022-10-14-preview/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", com.azure.core.util.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 b684adc7fbdf..fde61759282c 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/preview/2022-10-14-preview/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 7164432cfea4..9b17dd4003f2 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/ScalingPlan_Delete.json */ /** * Sample code: ScalingPlans_Delete. @@ -18,6 +16,8 @@ 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", com.azure.core.util.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 915699341a74..e655728a3c58 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/ScalingPlan_Get.json */ /** * Sample code: ScalingPlans_Get. @@ -18,6 +16,8 @@ public final class ScalingPlansGetByResourceGroupSamples { */ public static void scalingPlansGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().getByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", Context.NONE); + manager + .scalingPlans() + .getByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", com.azure.core.util.Context.NONE); } } 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 5e122b48892c..90590c909c29 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/ScalingPlan_ListByHostPool.json */ /** * Sample code: ScalingPlan_ListByHostPool. @@ -18,6 +16,8 @@ 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, com.azure.core.util.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 57249b0d430d..bd9279dd667d 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/ScalingPlan_ListByResourceGroup.json */ /** * Sample code: ScalingPlans_ListByResourceGroup. @@ -18,6 +16,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, com.azure.core.util.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 0a7d8c6a2fb6..4b84c48c451f 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/ScalingPlan_ListBySubscription.json */ /** * Sample code: ScalingPlans_ListBySubscription. @@ -18,6 +16,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, com.azure.core.util.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 c43ea38f28a3..92db2166b57d 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 @@ -4,13 +4,12 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -import com.azure.core.util.Context; 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/preview/2022-10-14-preview/examples/ScalingPlan_Update.json */ /** * Sample code: ScalingPlans_Update. @@ -22,7 +21,7 @@ public static void scalingPlansUpdate( ScalingPlan resource = manager .scalingPlans() - .getByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", Context.NONE) + .getByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", com.azure.core.util.Context.NONE) .getValue(); resource.update().apply(); } 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 7310c89fbddc..b5966b2130f7 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/SessionHost_Delete.json */ /** * Sample code: SessionHost_Delete. @@ -20,6 +18,7 @@ public static void sessionHostDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .sessionHosts() - .deleteWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", true, Context.NONE); + .deleteWithResponse( + "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", true, com.azure.core.util.Context.NONE); } } 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 fa9d06eb747b..e1f0241e3412 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/SessionHost_Get.json */ /** * Sample code: SessionHost_Get. @@ -20,6 +18,7 @@ public static void sessionHostGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .sessionHosts() - .getWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", Context.NONE); + .getWithResponse( + "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", com.azure.core.util.Context.NONE); } } 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 de47b5089a65..cb0a2d848766 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/SessionHost_List.json */ /** * Sample code: SessionHost_List. @@ -18,6 +16,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, com.azure.core.util.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 d1fd474e00a1..add2791f5395 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 @@ -4,13 +4,12 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -import com.azure.core.util.Context; 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/preview/2022-10-14-preview/examples/SessionHost_Update.json */ /** * Sample code: SessionHost_Update. @@ -26,7 +25,10 @@ public static void sessionHostUpdate( "hostPool1", "sessionHost1.microsoft.com", true, - new SessionHostPatch().withAllowNewSession(true).withAssignedUser("user1@microsoft.com"), - Context.NONE); + new SessionHostPatch() + .withAllowNewSession(true) + .withAssignedUser("user1@microsoft.com") + .withFriendlyName("friendly"), + com.azure.core.util.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 997d0140aa13..3173b718fcf3 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/StartMenuItem_List.json */ /** * Sample code: StartMenuItem_List. @@ -18,6 +16,8 @@ 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, com.azure.core.util.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 5d847efdc149..98920e43b323 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/UserSession_Delete.json */ /** * Sample code: UserSession_Delete. @@ -20,6 +18,12 @@ public static void userSessionDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .userSessions() - .deleteWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", true, Context.NONE); + .deleteWithResponse( + "resourceGroup1", + "hostPool1", + "sessionHost1.microsoft.com", + "1", + true, + com.azure.core.util.Context.NONE); } } 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 1bc422d2ee96..fca19e27c62d 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/UserSession_Disconnect_Post.json */ /** * Sample code: UserSession_Disconnect_Post. @@ -20,6 +18,7 @@ public static void userSessionDisconnectPost( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .userSessions() - .disconnectWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", Context.NONE); + .disconnectWithResponse( + "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", com.azure.core.util.Context.NONE); } } 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 0fa3fb965e88..2ff7700aec70 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/UserSession_Get.json */ /** * Sample code: UserSession_Get. @@ -20,6 +18,7 @@ public static void userSessionGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .userSessions() - .getWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", Context.NONE); + .getWithResponse( + "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", com.azure.core.util.Context.NONE); } } 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 85cdb2893091..d27c092ae84c 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/UserSession_ListByHostPool.json */ /** * Sample code: UserSession_ListByHostPool. @@ -24,6 +22,9 @@ public static void userSessionListByHostPool( "resourceGroup1", "hostPool1", "userPrincipalName eq 'user1@microsoft.com' and state eq 'active'", - Context.NONE); + 10, + true, + 0, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java index f6fc11a416ed..ac6648044238 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/UserSession_List.json */ /** * Sample code: UserSession_List. @@ -18,6 +16,15 @@ 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, + com.azure.core.util.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 5c02f0c8a62d..c3537cb13f56 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 @@ -4,13 +4,12 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -import com.azure.core.util.Context; 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/preview/2022-10-14-preview/examples/UserSession_SendMessage_Post.json */ /** * Sample code: UserSession_SendMessage_Post. @@ -27,6 +26,6 @@ public static void userSessionSendMessagePost( "sessionHost1.microsoft.com", "1", new SendMessage().withMessageTitle("title").withMessageBody("body"), - Context.NONE); + com.azure.core.util.Context.NONE); } } 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 9614c24a98c4..035ad1292fe9 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/preview/2022-10-14-preview/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 f654313f0379..e2de7ca56d66 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/Workspace_Delete.json */ /** * Sample code: Workspace_Delete. @@ -18,6 +16,8 @@ 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", com.azure.core.util.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 32aa24ea989a..d768e66d26f7 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/Workspace_Get.json */ /** * Sample code: Workspace_Get. @@ -18,6 +16,8 @@ public final class WorkspacesGetByResourceGroupSamples { */ public static void workspaceGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.workspaces().getByResourceGroupWithResponse("resourceGroup1", "workspace1", Context.NONE); + manager + .workspaces() + .getByResourceGroupWithResponse("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE); } } 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 b5930e1e766e..1fe3721ac5ee 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/Workspace_ListByResourceGroup.json */ /** * Sample code: Workspace_ListByResourceGroup. @@ -18,6 +16,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, com.azure.core.util.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 640a1e9a182a..694e2fbffaf3 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -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/preview/2022-10-14-preview/examples/Workspace_ListBySubscription.json */ /** * Sample code: Workspace_ListBySubscription. @@ -18,6 +16,6 @@ public final class WorkspacesListSamples { */ public static void workspaceListBySubscription( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.workspaces().list(Context.NONE); + manager.workspaces().list(com.azure.core.util.Context.NONE); } } 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 8e5f62b5b05f..283f8e01fd91 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 @@ -4,8 +4,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 +11,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/preview/2022-10-14-preview/examples/Workspace_Update.json */ /** * Sample code: Workspace_Update. @@ -25,14 +23,13 @@ public static void workspaceUpdate( Workspace resource = manager .workspaces() - .getByResourceGroupWithResponse("resourceGroup1", "workspace1", Context.NONE) + .getByResourceGroupWithResponse("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE) .getValue(); resource .update() .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) .apply(); }