diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md index f49ea63707c5..1ee7c533f18f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2022-12-13) + +- 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..dfd3a9be9df2 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(); } @@ -165,7 +166,7 @@ import com.azure.core.util.Context; /** Samples for ApplicationGroups Delete. */ public final class ApplicationGroupsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ApplicationGroup_Delete.json */ /** * Sample code: ApplicationGroup_Delete. @@ -174,7 +175,9 @@ public final class ApplicationGroupsDeleteSamples { */ public static void applicationGroupDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applicationGroups().deleteWithResponse("resourceGroup1", "applicationGroup1", Context.NONE); + manager + .applicationGroups() + .deleteByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", Context.NONE); } } ``` @@ -187,7 +190,7 @@ import com.azure.core.util.Context; /** Samples for ApplicationGroups GetByResourceGroup. */ public final class ApplicationGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ApplicationGroup_Get.json */ /** * Sample code: ApplicationGroup_Get. @@ -209,7 +212,7 @@ import com.azure.core.util.Context; /** Samples for ApplicationGroups List. */ public final class ApplicationGroupsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ApplicationGroup_ListBySubscription.json */ /** * Sample code: ApplicationGroup_List. @@ -231,7 +234,7 @@ import com.azure.core.util.Context; /** Samples for ApplicationGroups ListByResourceGroup. */ public final class ApplicationGroupsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ApplicationGroup_ListByResourceGroup.json */ /** * Sample code: ApplicationGroup_ListByResourceGroup. @@ -242,7 +245,8 @@ public final class ApplicationGroupsListByResourceGroupSamples { com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .applicationGroups() - .listByResourceGroup("resourceGroup1", "applicationGroupType eq 'RailApplication'", Context.NONE); + .listByResourceGroup( + "resourceGroup1", "applicationGroupType eq 'RailApplication'", 10, true, 0, Context.NONE); } } ``` @@ -258,7 +262,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. @@ -301,7 +305,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. @@ -335,7 +339,7 @@ import com.azure.core.util.Context; /** Samples for Applications Delete. */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Application_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Application_Delete.json */ /** * Sample code: Application_Delete. @@ -357,7 +361,7 @@ import com.azure.core.util.Context; /** Samples for Applications Get. */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Application_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Application_Get.json */ /** * Sample code: Application_Get. @@ -379,7 +383,7 @@ import com.azure.core.util.Context; /** Samples for Applications List. */ public final class ApplicationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Application_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Application_List.json */ /** * Sample code: Applications_List. @@ -388,7 +392,7 @@ public final class ApplicationsListSamples { */ public static void applicationsList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applications().list("resourceGroup1", "applicationGroup1", Context.NONE); + manager.applications().list("resourceGroup1", "applicationGroup1", 10, true, 0, Context.NONE); } } ``` @@ -404,7 +408,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. @@ -442,7 +446,7 @@ import com.azure.core.util.Context; /** Samples for Desktops Get. */ public final class DesktopsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Desktop_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Desktop_Get.json */ /** * Sample code: Desktop_Get. @@ -464,7 +468,7 @@ import com.azure.core.util.Context; /** Samples for Desktops List. */ public final class DesktopsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Desktop_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Desktop_List.json */ /** * Sample code: Desktop_List. @@ -473,7 +477,7 @@ public final class DesktopsListSamples { */ public static void desktopList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.desktops().list("resourceGroup1", "applicationGroup1", Context.NONE); + manager.desktops().list("resourceGroup1", "applicationGroup1", 10, true, 0, Context.NONE); } } ``` @@ -487,7 +491,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.DesktopPatch; /** Samples for Desktops Update. */ public final class DesktopsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Desktop_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Desktop_Update.json */ /** * Sample code: Desktop_Update. @@ -512,23 +516,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 +566,16 @@ public final class HostPoolsCreateOrUpdateSamples { .withSsoClientSecretKeyVaultPath("https://keyvault/secret") .withSsoSecretType(SsoSecretType.SHARED_KEY) .withStartVMOnConnect(false) - .withMigrationRequest( - new MigrationRequestProperties() - .withOperation(Operation.START) - .withMigrationPath( - "TenantGroups/{defaultV1TenantGroup.Name}/Tenants/{defaultV1Tenant.Name}/HostPools/{sessionHostPool.Name}")) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .withAgentUpdate( + new AgentUpdateProperties() + .withType(SessionHostComponentUpdateType.SCHEDULED) + .withUseSessionHostLocalTime(false) + .withMaintenanceWindowTimeZone("Alaskan Standard Time") + .withMaintenanceWindows( + Arrays + .asList( + new MaintenanceWindowProperties().withHour(7).withDayOfWeek(DayOfWeek.FRIDAY), + new MaintenanceWindowProperties().withHour(8).withDayOfWeek(DayOfWeek.SATURDAY)))) .create(); } @@ -590,7 +600,7 @@ import com.azure.core.util.Context; /** Samples for HostPools Delete. */ public final class HostPoolsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/HostPool_Delete.json */ /** * Sample code: HostPool_Delete. @@ -612,7 +622,7 @@ import com.azure.core.util.Context; /** Samples for HostPools GetByResourceGroup. */ public final class HostPoolsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/HostPool_Get.json */ /** * Sample code: HostPool_Get. @@ -634,7 +644,7 @@ import com.azure.core.util.Context; /** Samples for HostPools List. */ public final class HostPoolsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/HostPool_List.json */ /** * Sample code: HostPool_List. @@ -643,7 +653,7 @@ public final class HostPoolsListSamples { */ public static void hostPoolList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.hostPools().list(Context.NONE); + manager.hostPools().list(10, true, 0, Context.NONE); } } ``` @@ -656,7 +666,7 @@ import com.azure.core.util.Context; /** Samples for HostPools ListByResourceGroup. */ public final class HostPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/HostPool_ListByResourceGroup.json */ /** * Sample code: HostPool_ListByResourceGroup. @@ -665,7 +675,7 @@ public final class HostPoolsListByResourceGroupSamples { */ public static void hostPoolListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.hostPools().listByResourceGroup("resourceGroup1", Context.NONE); + manager.hostPools().listByResourceGroup("resourceGroup1", 10, true, 0, Context.NONE); } } ``` @@ -678,7 +688,7 @@ import com.azure.core.util.Context; /** Samples for HostPools RetrieveRegistrationToken. */ public final class HostPoolsRetrieveRegistrationTokenSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPools_RetrieveRegistrationToken_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/HostPools_RetrieveRegistrationToken_Post.json */ /** * Sample code: HostPools_RetrieveRegistrationToken_Post. @@ -696,21 +706,25 @@ public final class HostPoolsRetrieveRegistrationTokenSamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdatePatchProperties; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; import com.azure.resourcemanager.desktopvirtualization.models.HostPool; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; +import com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowPatchProperties; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfoPatch; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationTokenOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHostComponentUpdateType; import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for HostPools Update. */ public final class HostPoolsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/HostPool_Update.json */ /** * Sample code: HostPool_Update. @@ -739,7 +753,16 @@ public final class HostPoolsUpdateSamples { .withSsoClientSecretKeyVaultPath("https://keyvault/secret") .withSsoSecretType(SsoSecretType.SHARED_KEY) .withStartVMOnConnect(false) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .withAgentUpdate( + new AgentUpdatePatchProperties() + .withType(SessionHostComponentUpdateType.SCHEDULED) + .withUseSessionHostLocalTime(false) + .withMaintenanceWindowTimeZone("Alaskan Standard Time") + .withMaintenanceWindows( + Arrays + .asList( + new MaintenanceWindowPatchProperties().withHour(7).withDayOfWeek(DayOfWeek.FRIDAY), + new MaintenanceWindowPatchProperties().withHour(8).withDayOfWeek(DayOfWeek.SATURDAY)))) .apply(); } @@ -765,7 +788,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.MsixImageUri; /** Samples for MsixImages Expand. */ public final class MsixImagesExpandSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixImage_Expand_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/MsixImage_Expand_Post.json */ /** * Sample code: MsixImage_Expand. @@ -792,7 +815,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. @@ -845,7 +868,7 @@ import com.azure.core.util.Context; /** Samples for MsixPackages Delete. */ public final class MsixPackagesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/MsixPackage_Delete.json */ /** * Sample code: MSIXPackage_Delete. @@ -867,7 +890,7 @@ import com.azure.core.util.Context; /** Samples for MsixPackages Get. */ public final class MsixPackagesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/MsixPackage_Get.json */ /** * Sample code: MSIXPackage_Get. @@ -889,7 +912,7 @@ import com.azure.core.util.Context; /** Samples for MsixPackages List. */ public final class MsixPackagesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/MsixPackage_List.json */ /** * Sample code: MSIXPackage_List. @@ -898,7 +921,7 @@ public final class MsixPackagesListSamples { */ public static void mSIXPackageList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.msixPackages().list("resourceGroup1", "hostpool1", Context.NONE); + manager.msixPackages().list("resourceGroup1", "hostpool1", 10, true, 0, Context.NONE); } } ``` @@ -912,7 +935,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.MsixPackage; /** Samples for MsixPackages Update. */ public final class MsixPackagesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/MsixPackage_Update.json */ /** * Sample code: MSIXPackage_Update. @@ -939,7 +962,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/OperationDescription_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/OperationDescription_List.json */ /** * Sample code: OperationDescription_List. @@ -961,7 +984,7 @@ 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. @@ -986,7 +1009,7 @@ 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. @@ -1011,7 +1034,7 @@ 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. @@ -1036,7 +1059,7 @@ 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. @@ -1061,7 +1084,7 @@ 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 +1093,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, Context.NONE); } } ``` @@ -1083,7 +1108,7 @@ 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. @@ -1108,7 +1133,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. @@ -1145,7 +1170,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. @@ -1179,7 +1204,7 @@ 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 +1213,7 @@ 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, Context.NONE); } } ``` @@ -1201,7 +1226,7 @@ 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 +1235,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, 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 +import com.azure.core.util.Context; + +/** 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", Context.NONE); + } +} +``` + +### ScalingPlanPooledSchedules_Get + +```java +import com.azure.core.util.Context; + +/** 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", Context.NONE); + } +} +``` + +### ScalingPlanPooledSchedules_List + +```java +import com.azure.core.util.Context; + +/** 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, Context.NONE); + } +} +``` + +### ScalingPlanPooledSchedules_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedule; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import java.util.Arrays; + +/** Samples for 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", 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 +1418,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 +1432,10 @@ public final class ScalingPlansCreateSamples { .define("scalingPlan1") .withRegion("centralus") .withExistingResourceGroup("resourceGroup1") + .withTimeZone("Central Standard Time") .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("Description of Scaling Plan") .withFriendlyName("Scaling Plan 1") - .withTimeZone("Central Standard Time") .withHostPoolType(ScalingHostPoolType.POOLED) .withExclusionTag("value") .withSchedules( @@ -1310,7 +1497,7 @@ import com.azure.core.util.Context; /** Samples for ScalingPlans Delete. */ public final class ScalingPlansDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlan_Delete.json */ /** * Sample code: ScalingPlans_Delete. @@ -1319,7 +1506,7 @@ public final class ScalingPlansDeleteSamples { */ public static void scalingPlansDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().deleteWithResponse("resourceGroup1", "scalingPlan1", Context.NONE); + manager.scalingPlans().deleteByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", Context.NONE); } } ``` @@ -1332,7 +1519,7 @@ import com.azure.core.util.Context; /** Samples for ScalingPlans GetByResourceGroup. */ public final class ScalingPlansGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlan_Get.json */ /** * Sample code: ScalingPlans_Get. @@ -1354,7 +1541,7 @@ import com.azure.core.util.Context; /** Samples for ScalingPlans List. */ public final class ScalingPlansListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlan_ListBySubscription.json */ /** * Sample code: ScalingPlans_ListBySubscription. @@ -1363,7 +1550,7 @@ public final class ScalingPlansListSamples { */ public static void scalingPlansListBySubscription( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().list(Context.NONE); + manager.scalingPlans().list(10, true, 0, Context.NONE); } } ``` @@ -1376,7 +1563,7 @@ import com.azure.core.util.Context; /** Samples for ScalingPlans ListByHostPool. */ public final class ScalingPlansListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlan_ListByHostPool.json */ /** * Sample code: ScalingPlan_ListByHostPool. @@ -1385,7 +1572,7 @@ public final class ScalingPlansListByHostPoolSamples { */ public static void scalingPlanListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().listByHostPool("resourceGroup1", "hostPool1", Context.NONE); + manager.scalingPlans().listByHostPool("resourceGroup1", "hostPool1", 10, true, 0, Context.NONE); } } ``` @@ -1398,7 +1585,7 @@ import com.azure.core.util.Context; /** Samples for ScalingPlans ListByResourceGroup. */ public final class ScalingPlansListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlan_ListByResourceGroup.json */ /** * Sample code: ScalingPlans_ListByResourceGroup. @@ -1407,7 +1594,7 @@ public final class ScalingPlansListByResourceGroupSamples { */ public static void scalingPlansListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().listByResourceGroup("resourceGroup1", Context.NONE); + manager.scalingPlans().listByResourceGroup("resourceGroup1", 10, true, 0, Context.NONE); } } ``` @@ -1421,7 +1608,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlan; /** Samples for ScalingPlans Update. */ public final class ScalingPlansUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlan_Update.json */ /** * Sample code: ScalingPlans_Update. @@ -1448,7 +1635,7 @@ import com.azure.core.util.Context; /** Samples for SessionHosts Delete. */ public final class SessionHostsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/SessionHost_Delete.json */ /** * Sample code: SessionHost_Delete. @@ -1472,7 +1659,7 @@ import com.azure.core.util.Context; /** Samples for SessionHosts Get. */ public final class SessionHostsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/SessionHost_Get.json */ /** * Sample code: SessionHost_Get. @@ -1496,7 +1683,7 @@ import com.azure.core.util.Context; /** Samples for SessionHosts List. */ public final class SessionHostsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/SessionHost_List.json */ /** * Sample code: SessionHost_List. @@ -1505,7 +1692,7 @@ public final class SessionHostsListSamples { */ public static void sessionHostList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.sessionHosts().list("resourceGroup1", "hostPool1", Context.NONE); + manager.sessionHosts().list("resourceGroup1", "hostPool1", 10, true, 0, Context.NONE); } } ``` @@ -1519,7 +1706,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.SessionHostPatch; /** Samples for SessionHosts Update. */ public final class SessionHostsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/SessionHost_Update.json */ /** * Sample code: SessionHost_Update. @@ -1535,7 +1722,10 @@ public final class SessionHostsUpdateSamples { "hostPool1", "sessionHost1.microsoft.com", true, - new SessionHostPatch().withAllowNewSession(true).withAssignedUser("user1@microsoft.com"), + new SessionHostPatch() + .withAllowNewSession(true) + .withAssignedUser("user1@microsoft.com") + .withFriendlyName("friendly"), Context.NONE); } } @@ -1549,7 +1739,7 @@ import com.azure.core.util.Context; /** Samples for StartMenuItems List. */ public final class StartMenuItemsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/StartMenuItem_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/StartMenuItem_List.json */ /** * Sample code: StartMenuItem_List. @@ -1558,7 +1748,7 @@ public final class StartMenuItemsListSamples { */ public static void startMenuItemList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.startMenuItems().list("resourceGroup1", "applicationGroup1", Context.NONE); + manager.startMenuItems().list("resourceGroup1", "applicationGroup1", null, null, null, Context.NONE); } } ``` @@ -1571,7 +1761,7 @@ import com.azure.core.util.Context; /** Samples for UserSessions Delete. */ public final class UserSessionsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/UserSession_Delete.json */ /** * Sample code: UserSession_Delete. @@ -1595,7 +1785,7 @@ import com.azure.core.util.Context; /** Samples for UserSessions Disconnect. */ public final class UserSessionsDisconnectSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_Disconnect_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/UserSession_Disconnect_Post.json */ /** * Sample code: UserSession_Disconnect_Post. @@ -1619,7 +1809,7 @@ import com.azure.core.util.Context; /** Samples for UserSessions Get. */ public final class UserSessionsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/UserSession_Get.json */ /** * Sample code: UserSession_Get. @@ -1643,7 +1833,7 @@ import com.azure.core.util.Context; /** Samples for UserSessions List. */ public final class UserSessionsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/UserSession_List.json */ /** * Sample code: UserSession_List. @@ -1652,7 +1842,9 @@ public final class UserSessionsListSamples { */ public static void userSessionList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.userSessions().list("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", Context.NONE); + manager + .userSessions() + .list("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", 10, true, 0, Context.NONE); } } ``` @@ -1665,7 +1857,7 @@ import com.azure.core.util.Context; /** Samples for UserSessions ListByHostPool. */ public final class UserSessionsListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/UserSession_ListByHostPool.json */ /** * Sample code: UserSession_ListByHostPool. @@ -1680,6 +1872,9 @@ public final class UserSessionsListByHostPoolSamples { "resourceGroup1", "hostPool1", "userPrincipalName eq 'user1@microsoft.com' and state eq 'active'", + 10, + true, + 0, Context.NONE); } } @@ -1694,7 +1889,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.SendMessage; /** Samples for UserSessions SendMessage. */ public final class UserSessionsSendMessageSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_SendMessage_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/UserSession_SendMessage_Post.json */ /** * Sample code: UserSession_SendMessage_Post. @@ -1725,7 +1920,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. @@ -1766,7 +1961,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces Delete. */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Workspace_Delete.json */ /** * Sample code: Workspace_Delete. @@ -1775,7 +1970,7 @@ public final class WorkspacesDeleteSamples { */ public static void workspaceDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.workspaces().deleteWithResponse("resourceGroup1", "workspace1", Context.NONE); + manager.workspaces().deleteByResourceGroupWithResponse("resourceGroup1", "workspace1", Context.NONE); } } ``` @@ -1788,7 +1983,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces GetByResourceGroup. */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Workspace_Get.json */ /** * Sample code: Workspace_Get. @@ -1810,7 +2005,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces List. */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Workspace_ListBySubscription.json */ /** * Sample code: Workspace_ListBySubscription. @@ -1832,7 +2027,7 @@ import com.azure.core.util.Context; /** Samples for Workspaces ListByResourceGroup. */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Workspace_ListByResourceGroup.json */ /** * Sample code: Workspace_ListByResourceGroup. @@ -1841,7 +2036,7 @@ public final class WorkspacesListByResourceGroupSamples { */ public static void workspaceListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.workspaces().listByResourceGroup("resourceGroup1", Context.NONE); + manager.workspaces().listByResourceGroup("resourceGroup1", 10, true, 0, Context.NONE); } } ``` @@ -1850,7 +2045,6 @@ public final class WorkspacesListByResourceGroupSamples { ```java import com.azure.core.util.Context; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.Workspace; import java.util.HashMap; import java.util.Map; @@ -1858,7 +2052,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. @@ -1877,7 +2071,6 @@ public final class WorkspacesUpdateSamples { .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) .apply(); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml index c04618435a0d..31d7ac4a1363 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..8e1708df699c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationGroupsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationGroupsClient.java @@ -6,56 +6,14 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationGroupInner; import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupPatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ApplicationGroupsClient. */ public interface ApplicationGroupsClient { - /** - * Get an application group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application group along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String applicationGroupName); - - /** - * Get an application group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String applicationGroupName); - - /** - * Get an application group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationGroupInner getByResourceGroup(String resourceGroupName, String applicationGroupName); - /** * Get an application group. * @@ -72,20 +30,17 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String applicationGroupName, Context context); /** - * Create or update an applicationGroup. + * Get an application group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. - * @param applicationGroup Object containing ApplicationGroup definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a ApplicationGroup definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return an application group. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup); + ApplicationGroupInner getByResourceGroup(String resourceGroupName, String applicationGroupName); /** * Create or update an applicationGroup. @@ -93,14 +48,15 @@ Mono> createOrUpdateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationGroup Object containing ApplicationGroup definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a ApplicationGroup definition on successful completion of {@link Mono}. + * @return represents a ApplicationGroup definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup); + Response createOrUpdateWithResponse( + String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup, Context context); /** * Create or update an applicationGroup. @@ -117,60 +73,6 @@ Mono createOrUpdateAsync( ApplicationGroupInner createOrUpdate( String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup); - /** - * Create or update an applicationGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationGroup Object containing ApplicationGroup definitions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a ApplicationGroup definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup, Context context); - - /** - * Remove an applicationGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String applicationGroupName); - - /** - * Remove an applicationGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String applicationGroupName); - - /** - * Remove an applicationGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String applicationGroupName); - /** * Remove an applicationGroup. * @@ -186,20 +88,16 @@ Response createOrUpdateWithResponse( Response deleteWithResponse(String resourceGroupName, String applicationGroupName, Context context); /** - * Update an applicationGroup. + * Remove an applicationGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. - * @param applicationGroup Object containing ApplicationGroup definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a ApplicationGroup definition along with {@link Response} on successful completion of {@link - * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupPatch applicationGroup); + void delete(String resourceGroupName, String applicationGroupName); /** * Update an applicationGroup. @@ -207,27 +105,15 @@ Mono> updateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationGroup Object containing ApplicationGroup definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a ApplicationGroup definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupPatch applicationGroup); - - /** - * Update an applicationGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a ApplicationGroup definition on successful completion of {@link Mono}. + * @return represents a ApplicationGroup definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String applicationGroupName); + Response updateWithResponse( + String resourceGroupName, String applicationGroupName, ApplicationGroupPatch applicationGroup, Context context); /** * Update an applicationGroup. @@ -242,47 +128,6 @@ Mono updateAsync( @ServiceMethod(returns = ReturnType.SINGLE) ApplicationGroupInner update(String resourceGroupName, String applicationGroupName); - /** - * Update an applicationGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationGroup Object containing ApplicationGroup definitions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a ApplicationGroup definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String applicationGroupName, ApplicationGroupPatch applicationGroup, Context context); - - /** - * List applicationGroups. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return applicationGroupList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter); - - /** - * List applicationGroups. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return applicationGroupList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - /** * List applicationGroups. * @@ -300,6 +145,9 @@ Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -307,29 +155,13 @@ Response updateWithResponse( * @return applicationGroupList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context); - - /** - * List applicationGroups in subscription. - * - * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return applicationGroupList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String filter); - - /** - * List applicationGroups in subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return applicationGroupList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); + PagedIterable listByResourceGroup( + String resourceGroupName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * List applicationGroups in subscription. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationsClient.java index c5d01a671370..c0be6cb40fcd 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ApplicationsClient.java @@ -6,59 +6,14 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationInner; import com.azure.resourcemanager.desktopvirtualization.models.ApplicationPatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ApplicationsClient. */ public interface ApplicationsClient { - /** - * Get an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName); - - /** - * Get an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String applicationGroupName, String applicationName); - - /** - * Get an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInner get(String resourceGroupName, String applicationGroupName, String applicationName); - /** * Get an application. * @@ -76,52 +31,18 @@ Response getWithResponse( String resourceGroupName, String applicationGroupName, String applicationName, Context context); /** - * Create or update an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @param application Object containing Application definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Application properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application); - - /** - * Create or update an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @param application Object containing Application definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Application properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application); - - /** - * Create or update an application. + * Get an application. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. - * @param application Object containing Application definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Application properties. + * @return an application. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInner createOrUpdate( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application); + ApplicationInner get(String resourceGroupName, String applicationGroupName, String applicationName); /** * Create or update an application. @@ -145,46 +66,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Remove an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName); - - /** - * Remove an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String applicationGroupName, String applicationName); - - /** - * Remove an application. + * Create or update an application. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. + * @param application Object containing Application definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema for Application properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String applicationGroupName, String applicationName); + ApplicationInner createOrUpdate( + String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application); /** * Remove an application. @@ -203,53 +98,7 @@ Response deleteWithResponse( String resourceGroupName, String applicationGroupName, String applicationName, Context context); /** - * Update an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @param application Object containing Application definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Application properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationPatch application); - - /** - * Update an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @param application Object containing Application definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Application properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationPatch application); - - /** - * Update an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Application properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String applicationGroupName, String applicationName); - - /** - * Update an application. + * Remove an application. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. @@ -257,10 +106,9 @@ Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Application properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInner update(String resourceGroupName, String applicationGroupName, String applicationName); + void delete(String resourceGroupName, String applicationGroupName, String applicationName); /** * Update an application. @@ -284,17 +132,18 @@ Response updateWithResponse( Context context); /** - * List applications. + * Update an application. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param applicationName The name of the application within the specified application group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return applicationList as paginated response with {@link PagedFlux}. + * @return schema for Application properties. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String applicationGroupName); + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationInner update(String resourceGroupName, String applicationGroupName, String applicationName); /** * List applications. @@ -314,6 +163,9 @@ Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -321,5 +173,11 @@ Response updateWithResponse( * @return applicationList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String applicationGroupName, Context context); + PagedIterable list( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopVirtualizationApiClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopVirtualizationApiClient.java index 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..4e7b23e242bb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopsClient.java @@ -6,59 +6,14 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.DesktopInner; import com.azure.resourcemanager.desktopvirtualization.models.DesktopPatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in DesktopsClient. */ public interface DesktopsClient { - /** - * Get a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a desktop along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String applicationGroupName, String desktopName); - - /** - * Get a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a desktop on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String applicationGroupName, String desktopName); - - /** - * Get a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a desktop. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DesktopInner get(String resourceGroupName, String applicationGroupName, String desktopName); - /** * Get a desktop. * @@ -76,53 +31,7 @@ Response getWithResponse( String resourceGroupName, String applicationGroupName, String desktopName, Context context); /** - * Update a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop group. - * @param desktop Object containing Desktop definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Desktop properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String applicationGroupName, String desktopName, DesktopPatch desktop); - - /** - * Update a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop group. - * @param desktop Object containing Desktop definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Desktop properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String applicationGroupName, String desktopName, DesktopPatch desktop); - - /** - * Update a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Desktop properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String applicationGroupName, String desktopName); - - /** - * Update a desktop. + * Get a desktop. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. @@ -130,10 +39,10 @@ Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Desktop properties. + * @return a desktop. */ @ServiceMethod(returns = ReturnType.SINGLE) - DesktopInner update(String resourceGroupName, String applicationGroupName, String desktopName); + DesktopInner get(String resourceGroupName, String applicationGroupName, String desktopName); /** * Update a desktop. @@ -157,17 +66,18 @@ Response updateWithResponse( Context context); /** - * List desktops. + * Update a desktop. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param desktopName The name of the desktop within the specified desktop group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return desktopList as paginated response with {@link PagedFlux}. + * @return schema for Desktop properties. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String applicationGroupName); + @ServiceMethod(returns = ReturnType.SINGLE) + DesktopInner update(String resourceGroupName, String applicationGroupName, String desktopName); /** * List desktops. @@ -187,6 +97,9 @@ Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -194,5 +107,11 @@ Response updateWithResponse( * @return desktopList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String applicationGroupName, Context context); + PagedIterable list( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/HostPoolsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/HostPoolsClient.java index 10ae0b09fbf8..79fd7c0ff27f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/HostPoolsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/HostPoolsClient.java @@ -6,56 +6,15 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.HostPoolInner; import com.azure.resourcemanager.desktopvirtualization.fluent.models.RegistrationInfoInner; import com.azure.resourcemanager.desktopvirtualization.models.HostPoolPatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in HostPoolsClient. */ public interface HostPoolsClient { - /** - * Get a host pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a host pool along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String hostPoolName); - - /** - * Get a host pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a host pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String hostPoolName); - - /** - * Get a host pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a host pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - HostPoolInner getByResourceGroup(String resourceGroupName, String hostPoolName); - /** * Get a host pool. * @@ -72,47 +31,17 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String hostPoolName, Context context); /** - * Create or update a host pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param hostPool Object containing HostPool definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a HostPool definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String hostPoolName, HostPoolInner hostPool); - - /** - * Create or update a host pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param hostPool Object containing HostPool definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a HostPool definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String hostPoolName, HostPoolInner hostPool); - - /** - * Create or update a host pool. + * Get a host pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. - * @param hostPool Object containing HostPool definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a HostPool definition. + * @return a host pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - HostPoolInner createOrUpdate(String resourceGroupName, String hostPoolName, HostPoolInner hostPool); + HostPoolInner getByResourceGroup(String resourceGroupName, String hostPoolName); /** * Create or update a host pool. @@ -131,57 +60,18 @@ Response createOrUpdateWithResponse( String resourceGroupName, String hostPoolName, HostPoolInner hostPool, Context context); /** - * Remove a host pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param force Force flag to delete sessionHost. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, Boolean force); - - /** - * Remove a host pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param force Force flag to delete sessionHost. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String hostPoolName, Boolean force); - - /** - * Remove a host pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String hostPoolName); - - /** - * Remove a host pool. + * Create or update a host pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param hostPool Object containing HostPool definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a HostPool definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String hostPoolName); + HostPoolInner createOrUpdate(String resourceGroupName, String hostPoolName, HostPoolInner hostPool); /** * Remove a host pool. @@ -199,19 +89,16 @@ Response createOrUpdateWithResponse( Response deleteWithResponse(String resourceGroupName, String hostPoolName, Boolean force, Context context); /** - * Update a host pool. + * Remove a host pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. - * @param hostPool Object containing HostPool definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a HostPool definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String hostPoolName, HostPoolPatch hostPool); + void delete(String resourceGroupName, String hostPoolName); /** * Update a host pool. @@ -219,26 +106,15 @@ Mono> updateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param hostPool Object containing HostPool definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a HostPool definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String hostPoolName, HostPoolPatch hostPool); - - /** - * Update a host pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a HostPool definition on successful completion of {@link Mono}. + * @return represents a HostPool definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String hostPoolName); + Response updateWithResponse( + String resourceGroupName, String hostPoolName, HostPoolPatch hostPool, Context context); /** * Update a host pool. @@ -253,34 +129,6 @@ Mono> updateWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) HostPoolInner update(String resourceGroupName, String hostPoolName); - /** - * Update a host pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param hostPool Object containing HostPool definitions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a HostPool definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String hostPoolName, HostPoolPatch hostPool, Context context); - - /** - * List hostPools. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hostPoolList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - /** * List hostPools. * @@ -297,6 +145,9 @@ Response updateWithResponse( * List hostPools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -304,17 +155,8 @@ Response updateWithResponse( * @return hostPoolList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List hostPools in subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hostPoolList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); + PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * List hostPools in subscription. @@ -329,6 +171,9 @@ Response updateWithResponse( /** * List hostPools in subscription. * + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -336,35 +181,22 @@ Response updateWithResponse( * @return hostPoolList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Registration token of the host pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a RegistrationInfo definition along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> retrieveRegistrationTokenWithResponseAsync( - String resourceGroupName, String hostPoolName); + PagedIterable list(Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * Registration token of the host pool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a RegistrationInfo definition on successful completion of {@link Mono}. + * @return represents a RegistrationInfo definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono retrieveRegistrationTokenAsync(String resourceGroupName, String hostPoolName); + Response retrieveRegistrationTokenWithResponse( + String resourceGroupName, String hostPoolName, Context context); /** * Registration token of the host pool. @@ -378,19 +210,4 @@ Mono> retrieveRegistrationTokenWithResponseAsync */ @ServiceMethod(returns = ReturnType.SINGLE) RegistrationInfoInner retrieveRegistrationToken(String resourceGroupName, String hostPoolName); - - /** - * Registration token of the host pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a RegistrationInfo definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response retrieveRegistrationTokenWithResponse( - String resourceGroupName, String hostPoolName, Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixImagesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixImagesClient.java index 2920e831cb76..0877812b7daa 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixImagesClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixImagesClient.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.ExpandMsixImageInner; @@ -14,21 +13,6 @@ /** An instance of this class provides access to all the operations defined in MsixImagesClient. */ public interface MsixImagesClient { - /** - * Expands and Lists MSIX packages in an Image, given the Image Path. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param msixImageUri Object containing URI to MSIX Image. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return expandMsixImageList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux expandAsync( - String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri); - /** * Expands and Lists MSIX packages in an Image, given the Image Path. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixPackagesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixPackagesClient.java index c0b05592eeac..3cc286f60e03 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixPackagesClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/MsixPackagesClient.java @@ -6,59 +6,14 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.MsixPackageInner; import com.azure.resourcemanager.desktopvirtualization.models.MsixPackagePatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in MsixPackagesClient. */ public interface MsixPackagesClient { - /** - * Get a msixpackage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a msixpackage along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName); - - /** - * Get a msixpackage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a msixpackage on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName); - - /** - * Get a msixpackage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a msixpackage. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MsixPackageInner get(String resourceGroupName, String hostPoolName, String msixPackageFullName); - /** * Get a msixpackage. * @@ -76,52 +31,18 @@ Response getWithResponse( String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context); /** - * Create or update a MSIX package. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param msixPackage Object containing MSIX Package definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for MSIX Package properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage); - - /** - * Create or update a MSIX package. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param msixPackage Object containing MSIX Package definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for MSIX Package properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage); - - /** - * Create or update a MSIX package. + * Get a msixpackage. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param msixPackage Object containing MSIX Package definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for MSIX Package properties. + * @return a msixpackage. */ @ServiceMethod(returns = ReturnType.SINGLE) - MsixPackageInner createOrUpdate( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage); + MsixPackageInner get(String resourceGroupName, String hostPoolName, String msixPackageFullName); /** * Create or update a MSIX package. @@ -145,46 +66,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Remove an MSIX Package. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName); - - /** - * Remove an MSIX Package. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName); - - /** - * Remove an MSIX Package. + * Create or update a MSIX package. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. + * @param msixPackage Object containing MSIX Package definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema for MSIX Package properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String hostPoolName, String msixPackageFullName); + MsixPackageInner createOrUpdate( + String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage); /** * Remove an MSIX Package. @@ -203,53 +98,7 @@ Response deleteWithResponse( String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context); /** - * Update an MSIX Package. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param msixPackage Object containing MSIX Package definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for MSIX Package properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackagePatch msixPackage); - - /** - * Update an MSIX Package. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param msixPackage Object containing MSIX Package definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for MSIX Package properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackagePatch msixPackage); - - /** - * Update an MSIX Package. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for MSIX Package properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName); - - /** - * Update an MSIX Package. + * Remove an MSIX Package. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. @@ -257,10 +106,9 @@ Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for MSIX Package properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - MsixPackageInner update(String resourceGroupName, String hostPoolName, String msixPackageFullName); + void delete(String resourceGroupName, String hostPoolName, String msixPackageFullName); /** * Update an MSIX Package. @@ -284,17 +132,18 @@ Response updateWithResponse( Context context); /** - * List MSIX packages in hostpool. + * Update an MSIX Package. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return msixPackageList as paginated response with {@link PagedFlux}. + * @return schema for MSIX Package properties. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String hostPoolName); + @ServiceMethod(returns = ReturnType.SINGLE) + MsixPackageInner update(String resourceGroupName, String hostPoolName, String msixPackageFullName); /** * List MSIX packages in hostpool. @@ -314,6 +163,9 @@ Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -321,5 +173,11 @@ Response updateWithResponse( * @return msixPackageList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String hostPoolName, Context context); + PagedIterable list( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/OperationsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/OperationsClient.java index fbeb8668954a..55f6fa3f0751 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/OperationsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/OperationsClient.java @@ -6,23 +6,12 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.ResourceProviderOperationInner; /** An instance of this class provides access to all the operations defined in OperationsClient. */ public interface OperationsClient { - /** - * List all of the available operations the Desktop Virtualization resource provider supports. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list operations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); - /** * List all of the available operations the Desktop Virtualization resource provider supports. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateEndpointConnectionsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateEndpointConnectionsClient.java index 7fdef13cbec4..1a0e6857c7fd 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 @@ -6,36 +6,19 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner; import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public interface PrivateEndpointConnectionsClient { /** - * List private endpoint connections associated with hostpool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified storage account as paginated response - * with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName); - - /** - * List private endpoint connections associated with hostpool. + * 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 +26,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,62 +42,14 @@ PagedIterable listByHostPool( * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName, Context context); - - /** - * Get a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByHostPoolWithResponseAsync( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); - - /** - * Get a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByHostPoolAsync( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); - - /** - * Get a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionWithSystemDataInner getByHostPool( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + 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. @@ -124,60 +59,30 @@ PrivateEndpointConnectionWithSystemDataInner getByHostPool( * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); - - /** - * Remove a connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteByHostPoolWithResponseAsync( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); - - /** - * Remove a connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteByHostPoolAsync( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + Response getByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); /** - * Remove a connection. + * 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. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteByHostPool(String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + 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. * @param context The context to associate with this operation. @@ -187,55 +92,50 @@ Mono deleteByHostPoolAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); + Response deleteByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); /** - * Approve or reject a private endpoint connection. + * 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 connection Object containing the updated connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link - * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateByHostPoolWithResponseAsync( - String resourceGroupName, - String hostPoolName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection); + 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 on successful completion of {@link Mono}. + * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateByHostPoolAsync( + 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. @@ -245,54 +145,17 @@ Mono updateByHostPoolAsync( * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionWithSystemDataInner updateByHostPool( + PrivateEndpointConnectionWithSystemDataInner updateByWorkspace( String resourceGroupName, - String hostPoolName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection); /** - * Approve or reject a private endpoint connection. + * List private endpoint connections associated with hostpool. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param connection Object containing the updated connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateByHostPoolWithResponse( - String resourceGroupName, - String hostPoolName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection, - Context context); - - /** - * List private endpoint connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified storage account as paginated response - * with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByWorkspaceAsync( - String resourceGroupName, String workspaceName); - - /** - * List private endpoint connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -300,14 +163,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,62 +182,19 @@ PagedIterable listByWorkspace( * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName, Context context); - - /** - * Get a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByWorkspaceWithResponseAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName); - - /** - * Get a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByWorkspaceAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName); - - /** - * Get a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionWithSystemDataInner getByWorkspace( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + 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. @@ -381,60 +204,30 @@ PrivateEndpointConnectionWithSystemDataInner getByWorkspace( * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); - - /** - * Remove a connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteByWorkspaceWithResponseAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName); - - /** - * Remove a connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteByWorkspaceAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + Response getByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); /** - * Remove a connection. + * 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. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteByWorkspace(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + 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. * @param context The context to associate with this operation. @@ -444,55 +237,50 @@ Mono deleteByWorkspaceAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + Response deleteByHostPoolWithResponse( + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); /** - * Approve or reject a private endpoint connection. + * 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 connection Object containing the updated connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link - * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateByWorkspaceWithResponseAsync( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection); + 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 on successful completion of {@link Mono}. + * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateByWorkspaceAsync( + 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. @@ -502,31 +290,9 @@ Mono updateByWorkspaceAsync( * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionWithSystemDataInner updateByWorkspace( + PrivateEndpointConnectionWithSystemDataInner updateByHostPool( String resourceGroupName, - String workspaceName, + String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection); - - /** - * Approve or reject a private endpoint connection. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param connection Object containing the updated connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateByWorkspaceWithResponse( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection, - Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateLinkResourcesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateLinkResourcesClient.java index 859e673b4238..8e155879a24a 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 @@ -6,7 +6,6 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; @@ -14,77 +13,62 @@ /** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ public interface PrivateLinkResourcesClient { /** - * List the private link resources available for this hostpool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName); - - /** - * List the private link resources available for this hostpool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByHostPool(String resourceGroupName, String hostPoolName); - - /** - * List the private link resources available for this hostpool. + * 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 PagedFlux}. + * @return a list of private link resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName); + 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}. */ @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 +76,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..9dd370fa9bb9 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPooledSchedulesClient.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleInner; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedulePatch; + +/** An instance of this class provides access to all the operations defined in ScalingPlanPooledSchedulesClient. */ +public interface ScalingPlanPooledSchedulesClient { + /** + * Get a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPooledSchedule along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context); + + /** + * Get a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPooledSchedule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScalingPlanPooledScheduleInner get( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * Create or update a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPooledSchedule definitions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPooledSchedule definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponse( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner scalingPlanSchedule, + Context context); + + /** + * Create or update a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPooledSchedule definitions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPooledSchedule definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScalingPlanPooledScheduleInner create( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner scalingPlanSchedule); + + /** + * Remove a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context); + + /** + * Remove a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * Update a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPooledSchedule definitions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPooledSchedule definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledSchedulePatch scalingPlanSchedule, + Context context); + + /** + * Update a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPooledSchedule definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScalingPlanPooledScheduleInner update( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + + /** + * List ScalingPlanPooledSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPooledScheduleList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String scalingPlanName); + + /** + * List ScalingPlanPooledSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPooledScheduleList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String scalingPlanName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlansClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlansClient.java index d47902f9df8b..7cb33ef84deb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlansClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlansClient.java @@ -6,56 +6,14 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanInner; import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ScalingPlansClient. */ public interface ScalingPlansClient { - /** - * Get a scaling plan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scalingPlanName The name of the scaling plan. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scaling plan along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String scalingPlanName); - - /** - * Get a scaling plan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scalingPlanName The name of the scaling plan. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scaling plan on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String scalingPlanName); - - /** - * Get a scaling plan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scalingPlanName The name of the scaling plan. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scaling plan. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScalingPlanInner getByResourceGroup(String resourceGroupName, String scalingPlanName); - /** * Get a scaling plan. * @@ -72,47 +30,17 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String scalingPlanName, Context context); /** - * Create or update a scaling plan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scalingPlanName The name of the scaling plan. - * @param scalingPlan Object containing scaling plan definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlan along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createWithResponseAsync( - String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan); - - /** - * Create or update a scaling plan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scalingPlanName The name of the scaling plan. - * @param scalingPlan Object containing scaling plan definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlan on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan); - - /** - * Create or update a scaling plan. + * Get a scaling plan. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. - * @param scalingPlan Object containing scaling plan definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlan. + * @return a scaling plan. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScalingPlanInner create(String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan); + ScalingPlanInner getByResourceGroup(String resourceGroupName, String scalingPlanName); /** * Create or update a scaling plan. @@ -131,42 +59,18 @@ Response createWithResponse( String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan, Context context); /** - * Remove a scaling plan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scalingPlanName The name of the scaling plan. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String scalingPlanName); - - /** - * Remove a scaling plan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scalingPlanName The name of the scaling plan. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String scalingPlanName); - - /** - * Remove a scaling plan. + * Create or update a scaling plan. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. + * @param scalingPlan Object containing scaling plan definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlan. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String scalingPlanName); + ScalingPlanInner create(String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan); /** * Remove a scaling plan. @@ -183,19 +87,16 @@ Response createWithResponse( Response deleteWithResponse(String resourceGroupName, String scalingPlanName, Context context); /** - * Update a scaling plan. + * Remove a scaling plan. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. - * @param scalingPlan Object containing scaling plan definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan); + void delete(String resourceGroupName, String scalingPlanName); /** * Update a scaling plan. @@ -203,26 +104,15 @@ Mono> updateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlan Object containing scaling plan definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlan on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan); - - /** - * Update a scaling plan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scalingPlanName The name of the scaling plan. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlan on successful completion of {@link Mono}. + * @return scalingPlan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String scalingPlanName); + Response updateWithResponse( + String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan, Context context); /** * Update a scaling plan. @@ -237,34 +127,6 @@ Mono> updateWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) ScalingPlanInner update(String resourceGroupName, String scalingPlanName); - /** - * Update a scaling plan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scalingPlanName The name of the scaling plan. - * @param scalingPlan Object containing scaling plan definitions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlan along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan, Context context); - - /** - * List scaling plans. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlanList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - /** * List scaling plans. * @@ -281,6 +143,9 @@ Response updateWithResponse( * List scaling plans. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -288,17 +153,8 @@ Response updateWithResponse( * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List scaling plans in subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlanList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); + PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * List scaling plans in subscription. @@ -313,6 +169,9 @@ Response updateWithResponse( /** * List scaling plans in subscription. * + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -320,20 +179,7 @@ Response updateWithResponse( * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * List scaling plan associated with hostpool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlanList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName); + PagedIterable list(Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * List scaling plan associated with hostpool. @@ -353,6 +199,9 @@ Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -360,5 +209,11 @@ Response updateWithResponse( * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByHostPool(String resourceGroupName, String hostPoolName, Context context); + PagedIterable listByHostPool( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/SessionHostsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/SessionHostsClient.java index 13d7096863e3..06a04a331323 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/SessionHostsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/SessionHostsClient.java @@ -6,59 +6,14 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.SessionHostInner; import com.azure.resourcemanager.desktopvirtualization.models.SessionHostPatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in SessionHostsClient. */ public interface SessionHostsClient { - /** - * Get a session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a session host along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname); - - /** - * Get a session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a session host on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String hostPoolName, String sessionHostname); - - /** - * Get a session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a session host. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SessionHostInner get(String resourceGroupName, String hostPoolName, String sessionHostname); - /** * Get a session host. * @@ -76,52 +31,7 @@ Response getWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, Context context); /** - * Remove a SessionHost. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to force sessionHost deletion even when userSession exists. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force); - - /** - * Remove a SessionHost. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to force sessionHost deletion even when userSession exists. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force); - - /** - * Remove a SessionHost. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String hostPoolName, String sessionHostname); - - /** - * Remove a SessionHost. + * Get a session host. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. @@ -129,9 +39,10 @@ Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a session host. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String hostPoolName, String sessionHostname); + SessionHostInner get(String resourceGroupName, String hostPoolName, String sessionHostname); /** * Remove a SessionHost. @@ -151,63 +62,7 @@ Response deleteWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force, Context context); /** - * Update a session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to update assign, unassign or reassign personal desktop. - * @param sessionHost Object containing SessionHost definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SessionHost definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Boolean force, - SessionHostPatch sessionHost); - - /** - * Update a session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to update assign, unassign or reassign personal desktop. - * @param sessionHost Object containing SessionHost definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SessionHost definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Boolean force, - SessionHostPatch sessionHost); - - /** - * Update a session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SessionHost definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String hostPoolName, String sessionHostname); - - /** - * Update a session host. + * Remove a SessionHost. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. @@ -215,10 +70,9 @@ Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SessionHost definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - SessionHostInner update(String resourceGroupName, String hostPoolName, String sessionHostname); + void delete(String resourceGroupName, String hostPoolName, String sessionHostname); /** * Update a session host. @@ -244,17 +98,18 @@ Response updateWithResponse( Context context); /** - * List sessionHosts. + * Update a session host. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param sessionHostname The name of the session host within the specified host pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sessionHostList as paginated response with {@link PagedFlux}. + * @return represents a SessionHost definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String hostPoolName); + @ServiceMethod(returns = ReturnType.SINGLE) + SessionHostInner update(String resourceGroupName, String hostPoolName, String sessionHostname); /** * List sessionHosts. @@ -274,6 +129,9 @@ Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -281,5 +139,11 @@ Response updateWithResponse( * @return sessionHostList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String hostPoolName, Context context); + PagedIterable list( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/StartMenuItemsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/StartMenuItemsClient.java index ec4a8949e9c4..3ea0b7969ea5 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/StartMenuItemsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/StartMenuItemsClient.java @@ -6,26 +6,12 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.StartMenuItemInner; /** An instance of this class provides access to all the operations defined in StartMenuItemsClient. */ public interface StartMenuItemsClient { - /** - * List start menu items in the given application group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return startMenuItemList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String applicationGroupName); - /** * List start menu items in the given application group. * @@ -44,6 +30,9 @@ public interface StartMenuItemsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,5 +40,11 @@ public interface StartMenuItemsClient { * @return startMenuItemList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String applicationGroupName, Context context); + PagedIterable list( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/UserSessionsClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/UserSessionsClient.java index 9011c3d00861..4c3fe545e573 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/UserSessionsClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/UserSessionsClient.java @@ -6,43 +6,14 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.UserSessionInner; import com.azure.resourcemanager.desktopvirtualization.models.SendMessage; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in UserSessionsClient. */ public interface UserSessionsClient { - /** - * List userSessions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return userSessionList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName, String filter); - - /** - * List userSessions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return userSessionList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName); - /** * List userSessions. * @@ -62,6 +33,9 @@ public interface UserSessionsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -70,54 +44,13 @@ public interface UserSessionsClient { */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName, String filter, Context context); - - /** - * Get a userSession. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a userSession along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); - - /** - * Get a userSession. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a userSession on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); - - /** - * Get a userSession. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a userSession. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - UserSessionInner get(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + String resourceGroupName, + String hostPoolName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * Get a userSession. @@ -137,56 +70,7 @@ Response getWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context); /** - * Remove a userSession. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @param force Force flag to login off userSession. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Boolean force); - - /** - * Remove a userSession. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @param force Force flag to login off userSession. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Boolean force); - - /** - * Remove a userSession. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); - - /** - * Remove a userSession. + * Get a userSession. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. @@ -195,9 +79,10 @@ Mono deleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a userSession. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + UserSessionInner get(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); /** * Remove a userSession. @@ -223,18 +108,18 @@ Response deleteWithResponse( Context context); /** - * List userSessions. + * Remove a userSession. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. + * @param userSessionId The name of the user session within the specified session host. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return userSessionList as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(String resourceGroupName, String hostPoolName, String sessionHostname); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); /** * List userSessions. @@ -256,6 +141,9 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -264,53 +152,13 @@ Response deleteWithResponse( */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context); - - /** - * Disconnect a userSession. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> disconnectWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); - - /** - * Disconnect a userSession. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono disconnectAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); - - /** - * Disconnect a userSession. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void disconnect(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * Disconnect a userSession. @@ -330,25 +178,18 @@ Response disconnectWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context); /** - * Send a message to a user. + * Disconnect a userSession. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. - * @param sendMessage Object containing message includes title and message body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> sendMessageWithResponseAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - SendMessage sendMessage); + void disconnect(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); /** * Send a message to a user. @@ -358,34 +199,20 @@ Mono> sendMessageWithResponseAsync( * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. * @param sendMessage Object containing message includes title and message body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono sendMessageAsync( + Response sendMessageWithResponse( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, - SendMessage sendMessage); - - /** - * Send a message to a user. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono sendMessageAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + SendMessage sendMessage, + Context context); /** * Send a message to a user. @@ -400,27 +227,4 @@ Mono sendMessageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) void sendMessage(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); - - /** - * Send a message to a user. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @param sendMessage Object containing message includes title and message body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response sendMessageWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - SendMessage sendMessage, - Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/WorkspacesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/WorkspacesClient.java index 0ef2fecc1512..cf03780dc271 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/WorkspacesClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/WorkspacesClient.java @@ -6,55 +6,14 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.WorkspaceInner; import com.azure.resourcemanager.desktopvirtualization.models.WorkspacePatch; -import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in WorkspacesClient. */ public interface WorkspacesClient { - /** - * Get a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workspace along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String workspaceName); - - /** - * Get a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workspace on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName); - - /** - * Get a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); - /** * Get a workspace. * @@ -71,47 +30,17 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String workspaceName, Context context); /** - * Create or update a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param workspace Object containing Workspace definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Workspace definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspaceInner workspace); - - /** - * Create or update a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param workspace Object containing Workspace definitions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Workspace definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, WorkspaceInner workspace); - - /** - * Create or update a workspace. + * Get a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param workspace Object containing Workspace definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Workspace definition. + * @return a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner workspace); + WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); /** * Create or update a workspace. @@ -130,42 +59,18 @@ Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, WorkspaceInner workspace, Context context); /** - * Remove a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName); - - /** - * Remove a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String workspaceName); - - /** - * Remove a workspace. + * Create or update a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param workspace Object containing Workspace definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a Workspace definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName); + WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner workspace); /** * Remove a workspace. @@ -182,19 +87,16 @@ Response createOrUpdateWithResponse( Response deleteWithResponse(String resourceGroupName, String workspaceName, Context context); /** - * Update a workspace. + * Remove a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param workspace Object containing Workspace definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Workspace definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspacePatch workspace); + void delete(String resourceGroupName, String workspaceName); /** * Update a workspace. @@ -202,26 +104,15 @@ Mono> updateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param workspace Object containing Workspace definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Workspace definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String workspaceName, WorkspacePatch workspace); - - /** - * Update a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Workspace definition on successful completion of {@link Mono}. + * @return represents a Workspace definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String workspaceName); + Response updateWithResponse( + String resourceGroupName, String workspaceName, WorkspacePatch workspace, Context context); /** * Update a workspace. @@ -236,34 +127,6 @@ Mono> updateWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) WorkspaceInner update(String resourceGroupName, String workspaceName); - /** - * Update a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param workspace Object containing Workspace definitions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Workspace definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String workspaceName, WorkspacePatch workspace, Context context); - - /** - * List workspaces. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspaceList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync(String resourceGroupName); - /** * List workspaces. * @@ -280,6 +143,9 @@ Response updateWithResponse( * List workspaces. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -287,17 +153,8 @@ Response updateWithResponse( * @return workspaceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * List workspaces in subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspaceList as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync(); + PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * List workspaces in subscription. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupInner.java index 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..097ca36cbda5 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); @@ -182,7 +185,7 @@ Mono> listBySubscriptionNext( * @return an application group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( + private Mono> getByResourceGroupWithResponseAsync( String resourceGroupName, String applicationGroupName) { if (this.client.getEndpoint() == null) { return Mono @@ -278,7 +281,7 @@ private Mono> getByResourceGroupWithResponseAsyn * @return an application group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String applicationGroupName) { + private Mono getByResourceGroupAsync(String resourceGroupName, String applicationGroupName) { return getByResourceGroupWithResponseAsync(resourceGroupName, applicationGroupName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -288,14 +291,16 @@ public Mono getByResourceGroupAsync(String resourceGroupN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application group. + * @return an application group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationGroupInner getByResourceGroup(String resourceGroupName, String applicationGroupName) { - return getByResourceGroupAsync(resourceGroupName, applicationGroupName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String applicationGroupName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, applicationGroupName, context).block(); } /** @@ -303,16 +308,14 @@ public ApplicationGroupInner getByResourceGroup(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application group along with {@link Response}. + * @return an application group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String applicationGroupName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, applicationGroupName, context).block(); + public ApplicationGroupInner getByResourceGroup(String resourceGroupName, String applicationGroupName) { + return getByResourceGroupWithResponse(resourceGroupName, applicationGroupName, Context.NONE).getValue(); } /** @@ -328,7 +331,7 @@ public Response getByResourceGroupWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup) { if (this.client.getEndpoint() == null) { return Mono @@ -444,7 +447,7 @@ private Mono> createOrUpdateWithResponseAsync( * @return represents a ApplicationGroup definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup) { return createOrUpdateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -456,15 +459,20 @@ public Mono createOrUpdateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationGroup Object containing ApplicationGroup definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a ApplicationGroup definition. + * @return represents a ApplicationGroup definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationGroupInner createOrUpdate( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup) { - return createOrUpdateAsync(resourceGroupName, applicationGroupName, applicationGroup).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String applicationGroupName, + ApplicationGroupInner applicationGroup, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup, context) + .block(); } /** @@ -473,20 +481,16 @@ public ApplicationGroupInner createOrUpdate( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationGroup Object containing ApplicationGroup definitions. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a ApplicationGroup definition along with {@link Response}. + * @return represents a ApplicationGroup definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String applicationGroupName, - ApplicationGroupInner applicationGroup, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup, context) - .block(); + public ApplicationGroupInner createOrUpdate( + String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup) { + return createOrUpdateWithResponse(resourceGroupName, applicationGroupName, applicationGroup, Context.NONE) + .getValue(); } /** @@ -500,7 +504,7 @@ public Response createOrUpdateWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String applicationGroupName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String applicationGroupName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -595,7 +599,7 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String applicationGroupName) { + private Mono deleteAsync(String resourceGroupName, String applicationGroupName) { return deleteWithResponseAsync(resourceGroupName, applicationGroupName).flatMap(ignored -> Mono.empty()); } @@ -604,13 +608,15 @@ public Mono deleteAsync(String resourceGroupName, String applicationGroupN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String applicationGroupName) { - deleteAsync(resourceGroupName, applicationGroupName).block(); + public Response deleteWithResponse(String resourceGroupName, String applicationGroupName, Context context) { + return deleteWithResponseAsync(resourceGroupName, applicationGroupName, context).block(); } /** @@ -618,15 +624,13 @@ public void delete(String resourceGroupName, String applicationGroupName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String applicationGroupName, Context context) { - return deleteWithResponseAsync(resourceGroupName, applicationGroupName, context).block(); + public void delete(String resourceGroupName, String applicationGroupName) { + deleteWithResponse(resourceGroupName, applicationGroupName, Context.NONE); } /** @@ -642,7 +646,7 @@ public Response deleteWithResponse(String resourceGroupName, String applic * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String applicationGroupName, ApplicationGroupPatch applicationGroup) { if (this.client.getEndpoint() == null) { return Mono @@ -745,15 +749,14 @@ private Mono> updateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. - * @param applicationGroup Object containing ApplicationGroup definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a ApplicationGroup definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupPatch applicationGroup) { + private Mono updateAsync(String resourceGroupName, String applicationGroupName) { + final ApplicationGroupPatch applicationGroup = null; return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -763,16 +766,20 @@ public Mono updateAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param applicationGroup Object containing ApplicationGroup definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a ApplicationGroup definition on successful completion of {@link Mono}. + * @return represents a ApplicationGroup definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String applicationGroupName) { - final ApplicationGroupPatch applicationGroup = null; - return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, + String applicationGroupName, + ApplicationGroupPatch applicationGroup, + Context context) { + return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup, context).block(); } /** @@ -788,28 +795,7 @@ public Mono updateAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public ApplicationGroupInner update(String resourceGroupName, String applicationGroupName) { final ApplicationGroupPatch applicationGroup = null; - return updateAsync(resourceGroupName, applicationGroupName, applicationGroup).block(); - } - - /** - * Update an applicationGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationGroup Object containing ApplicationGroup definitions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a ApplicationGroup definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String applicationGroupName, - ApplicationGroupPatch applicationGroup, - Context context) { - return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup, context).block(); + return updateWithResponse(resourceGroupName, applicationGroupName, applicationGroup, Context.NONE).getValue(); } /** @@ -817,6 +803,9 @@ public Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -824,7 +813,7 @@ public Response updateWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String filter) { + String resourceGroupName, String filter, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -852,6 +841,9 @@ private Mono> listByResourceGroupSinglePage this.client.getSubscriptionId(), resourceGroupName, filter, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -871,6 +863,9 @@ private Mono> listByResourceGroupSinglePage * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -879,7 +874,12 @@ private Mono> listByResourceGroupSinglePage */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String filter, Context context) { + String resourceGroupName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -905,6 +905,9 @@ private Mono> listByResourceGroupSinglePage this.client.getSubscriptionId(), resourceGroupName, filter, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -923,15 +926,19 @@ private Mono> listByResourceGroupSinglePage * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return applicationGroupList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter) { + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, String filter, Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, pageSize, isDescending, initialSkip), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } @@ -945,10 +952,13 @@ public PagedFlux listByResourceGroupAsync(String resource * @return applicationGroupList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { final String filter = null; + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, pageSize, isDescending, initialSkip), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } @@ -957,6 +967,9 @@ public PagedFlux listByResourceGroupAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -965,9 +978,16 @@ public PagedFlux listByResourceGroupAsync(String resource */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( - String resourceGroupName, String filter, Context context) { + String resourceGroupName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, context), + () -> + listByResourceGroupSinglePageAsync( + resourceGroupName, filter, pageSize, isDescending, initialSkip, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } @@ -983,7 +1003,11 @@ private PagedFlux listByResourceGroupAsync( @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { final String filter = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listByResourceGroupAsync(resourceGroupName, filter, pageSize, isDescending, initialSkip)); } /** @@ -991,6 +1015,9 @@ public PagedIterable listByResourceGroup(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -999,8 +1026,14 @@ public PagedIterable listByResourceGroup(String resourceG */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup( - String resourceGroupName, String filter, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter, context)); + String resourceGroupName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listByResourceGroupAsync(resourceGroupName, filter, pageSize, isDescending, initialSkip, context)); } /** @@ -1105,7 +1138,7 @@ private Mono> listSinglePageAsync(String fi * @return applicationGroupList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String filter) { + private PagedFlux listAsync(String filter) { return new PagedFlux<>( () -> listSinglePageAsync(filter), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } @@ -1118,7 +1151,7 @@ public PagedFlux listAsync(String filter) { * @return applicationGroupList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { + private PagedFlux listAsync() { final String filter = null; return new PagedFlux<>( () -> listSinglePageAsync(filter), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); @@ -1172,7 +1205,8 @@ public PagedIterable list(String filter, Context context) /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1208,7 +1242,8 @@ private Mono> listByResourceGroupNextSingle /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1245,7 +1280,8 @@ private Mono> listByResourceGroupNextSingle /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1281,7 +1317,8 @@ private Mono> listBySubscriptionNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupsImpl.java index 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..5bc825be7410 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); @@ -169,7 +172,7 @@ Mono> listNext( * @return an application along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String applicationGroupName, String applicationName) { if (this.client.getEndpoint() == null) { return Mono @@ -277,7 +280,7 @@ private Mono> getWithResponseAsync( * @return an application on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( + private Mono getAsync( String resourceGroupName, String applicationGroupName, String applicationName) { return getWithResponseAsync(resourceGroupName, applicationGroupName, applicationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -289,14 +292,16 @@ public Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application. + * @return an application along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInner get(String resourceGroupName, String applicationGroupName, String applicationName) { - return getAsync(resourceGroupName, applicationGroupName, applicationName).block(); + public Response getWithResponse( + String resourceGroupName, String applicationGroupName, String applicationName, Context context) { + return getWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, context).block(); } /** @@ -305,16 +310,14 @@ public ApplicationInner get(String resourceGroupName, String applicationGroupNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application along with {@link Response}. + * @return an application. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String applicationGroupName, String applicationName, Context context) { - return getWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, context).block(); + public ApplicationInner get(String resourceGroupName, String applicationGroupName, String applicationName) { + return getWithResponse(resourceGroupName, applicationGroupName, applicationName, Context.NONE).getValue(); } /** @@ -330,7 +333,7 @@ public Response getWithResponse( * @return schema for Application properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application) { if (this.client.getEndpoint() == null) { return Mono @@ -456,7 +459,7 @@ private Mono> createOrUpdateWithResponseAsync( * @return schema for Application properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application) { return createOrUpdateWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, application) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -469,15 +472,22 @@ public Mono createOrUpdateAsync( * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. * @param application Object containing Application definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Application properties. + * @return schema for Application properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInner createOrUpdate( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application) { - return createOrUpdateAsync(resourceGroupName, applicationGroupName, applicationName, application).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String applicationGroupName, + String applicationName, + ApplicationInner application, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, applicationGroupName, applicationName, application, context) + .block(); } /** @@ -487,22 +497,17 @@ public ApplicationInner createOrUpdate( * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. * @param application Object containing Application definitions. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Application properties along with {@link Response}. + * @return schema for Application properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String applicationGroupName, - String applicationName, - ApplicationInner application, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, applicationGroupName, applicationName, application, context) - .block(); + public ApplicationInner createOrUpdate( + String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application) { + return createOrUpdateWithResponse( + resourceGroupName, applicationGroupName, applicationName, application, Context.NONE) + .getValue(); } /** @@ -517,7 +522,7 @@ public Response createOrUpdateWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( + private Mono> deleteWithResponseAsync( String resourceGroupName, String applicationGroupName, String applicationName) { if (this.client.getEndpoint() == null) { return Mono @@ -625,7 +630,7 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String applicationGroupName, String applicationName) { + private Mono deleteAsync(String resourceGroupName, String applicationGroupName, String applicationName) { return deleteWithResponseAsync(resourceGroupName, applicationGroupName, applicationName) .flatMap(ignored -> Mono.empty()); } @@ -636,13 +641,16 @@ public Mono deleteAsync(String resourceGroupName, String applicationGroupN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String applicationGroupName, String applicationName) { - deleteAsync(resourceGroupName, applicationGroupName, applicationName).block(); + public Response deleteWithResponse( + String resourceGroupName, String applicationGroupName, String applicationName, Context context) { + return deleteWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, context).block(); } /** @@ -651,16 +659,13 @@ public void delete(String resourceGroupName, String applicationGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String applicationGroupName, String applicationName, Context context) { - return deleteWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, context).block(); + public void delete(String resourceGroupName, String applicationGroupName, String applicationName) { + deleteWithResponse(resourceGroupName, applicationGroupName, applicationName, Context.NONE); } /** @@ -676,7 +681,7 @@ public Response deleteWithResponse( * @return schema for Application properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String applicationGroupName, String applicationName, ApplicationPatch application) { if (this.client.getEndpoint() == null) { return Mono @@ -791,15 +796,15 @@ private Mono> updateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. - * @param application Object containing Application definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return schema for Application properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationPatch application) { + private Mono updateAsync( + String resourceGroupName, String applicationGroupName, String applicationName) { + final ApplicationPatch application = null; return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, application) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -810,17 +815,22 @@ public Mono updateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param applicationName The name of the application within the specified application group. + * @param application Object containing Application definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Application properties on successful completion of {@link Mono}. + * @return schema for Application properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String applicationGroupName, String applicationName) { - final ApplicationPatch application = null; - return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, application) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, + String applicationGroupName, + String applicationName, + ApplicationPatch application, + Context context) { + return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, application, context) + .block(); } /** @@ -837,31 +847,8 @@ public Mono updateAsync( @ServiceMethod(returns = ReturnType.SINGLE) public ApplicationInner update(String resourceGroupName, String applicationGroupName, String applicationName) { final ApplicationPatch application = null; - return updateAsync(resourceGroupName, applicationGroupName, applicationName, application).block(); - } - - /** - * Update an application. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param applicationName The name of the application within the specified application group. - * @param application Object containing Application definitions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Application properties along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String applicationGroupName, - String applicationName, - ApplicationPatch application, - Context context) { - return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, application, context) - .block(); + return updateWithResponse(resourceGroupName, applicationGroupName, applicationName, application, Context.NONE) + .getValue(); } /** @@ -869,6 +856,9 @@ public Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -876,7 +866,11 @@ public Response updateWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String applicationGroupName) { + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -908,6 +902,9 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -927,6 +924,9 @@ private Mono> listSinglePageAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -935,7 +935,12 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String applicationGroupName, Context context) { + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -965,6 +970,9 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -978,6 +986,31 @@ private Mono> listSinglePageAsync( null)); } + /** + * List applications. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return applicationList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + /** * List applications. * @@ -989,9 +1022,12 @@ private Mono> listSinglePageAsync( * @return applicationList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String applicationGroupName) { + private PagedFlux listAsync(String resourceGroupName, String applicationGroupName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, applicationGroupName), + () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -1000,6 +1036,9 @@ public PagedFlux listAsync(String resourceGroupName, String ap * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1008,9 +1047,16 @@ public PagedFlux listAsync(String resourceGroupName, String ap */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String applicationGroupName, Context context) { + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, applicationGroupName, context), + () -> + listSinglePageAsync( + resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -1026,7 +1072,11 @@ private PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String applicationGroupName) { - return new PagedIterable<>(listAsync(resourceGroupName, applicationGroupName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip)); } /** @@ -1034,6 +1084,9 @@ public PagedIterable list(String resourceGroupName, String app * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1042,14 +1095,21 @@ public PagedIterable list(String resourceGroupName, String app */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String resourceGroupName, String applicationGroupName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, applicationGroupName, context)); + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context)); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1084,7 +1144,8 @@ private Mono> listNextSinglePageAsync(String nex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationsImpl.java index 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..5d32811c4cda 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); @@ -129,7 +132,7 @@ Mono> listNext( * @return a desktop along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String applicationGroupName, String desktopName) { if (this.client.getEndpoint() == null) { return Mono @@ -235,7 +238,7 @@ private Mono> getWithResponseAsync( * @return a desktop on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String applicationGroupName, String desktopName) { + private Mono getAsync(String resourceGroupName, String applicationGroupName, String desktopName) { return getWithResponseAsync(resourceGroupName, applicationGroupName, desktopName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -246,14 +249,16 @@ public Mono getAsync(String resourceGroupName, String applicationG * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param desktopName The name of the desktop within the specified desktop group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a desktop. + * @return a desktop along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DesktopInner get(String resourceGroupName, String applicationGroupName, String desktopName) { - return getAsync(resourceGroupName, applicationGroupName, desktopName).block(); + public Response getWithResponse( + String resourceGroupName, String applicationGroupName, String desktopName, Context context) { + return getWithResponseAsync(resourceGroupName, applicationGroupName, desktopName, context).block(); } /** @@ -262,16 +267,14 @@ public DesktopInner get(String resourceGroupName, String applicationGroupName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param desktopName The name of the desktop within the specified desktop group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a desktop along with {@link Response}. + * @return a desktop. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String applicationGroupName, String desktopName, Context context) { - return getWithResponseAsync(resourceGroupName, applicationGroupName, desktopName, context).block(); + public DesktopInner get(String resourceGroupName, String applicationGroupName, String desktopName) { + return getWithResponse(resourceGroupName, applicationGroupName, desktopName, Context.NONE).getValue(); } /** @@ -287,7 +290,7 @@ public Response getWithResponse( * @return schema for Desktop properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String applicationGroupName, String desktopName, DesktopPatch desktop) { if (this.client.getEndpoint() == null) { return Mono @@ -400,15 +403,14 @@ private Mono> updateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param desktopName The name of the desktop within the specified desktop group. - * @param desktop Object containing Desktop definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return schema for Desktop properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String applicationGroupName, String desktopName, DesktopPatch desktop) { + private Mono updateAsync(String resourceGroupName, String applicationGroupName, String desktopName) { + final DesktopPatch desktop = null; return updateWithResponseAsync(resourceGroupName, applicationGroupName, desktopName, desktop) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -419,16 +421,21 @@ public Mono updateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param desktopName The name of the desktop within the specified desktop group. + * @param desktop Object containing Desktop definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Desktop properties on successful completion of {@link Mono}. + * @return schema for Desktop properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String applicationGroupName, String desktopName) { - final DesktopPatch desktop = null; - return updateWithResponseAsync(resourceGroupName, applicationGroupName, desktopName, desktop) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, + String applicationGroupName, + String desktopName, + DesktopPatch desktop, + Context context) { + return updateWithResponseAsync(resourceGroupName, applicationGroupName, desktopName, desktop, context).block(); } /** @@ -445,30 +452,8 @@ public Mono updateAsync(String resourceGroupName, String applicati @ServiceMethod(returns = ReturnType.SINGLE) public DesktopInner update(String resourceGroupName, String applicationGroupName, String desktopName) { final DesktopPatch desktop = null; - return updateAsync(resourceGroupName, applicationGroupName, desktopName, desktop).block(); - } - - /** - * Update a desktop. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param applicationGroupName The name of the application group. - * @param desktopName The name of the desktop within the specified desktop group. - * @param desktop Object containing Desktop definitions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for Desktop properties along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String applicationGroupName, - String desktopName, - DesktopPatch desktop, - Context context) { - return updateWithResponseAsync(resourceGroupName, applicationGroupName, desktopName, desktop, context).block(); + return updateWithResponse(resourceGroupName, applicationGroupName, desktopName, desktop, Context.NONE) + .getValue(); } /** @@ -476,6 +461,9 @@ public Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -483,7 +471,11 @@ public Response updateWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String applicationGroupName) { + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -515,6 +507,9 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -534,6 +529,9 @@ private Mono> listSinglePageAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -542,7 +540,12 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String applicationGroupName, Context context) { + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -572,6 +575,9 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -585,6 +591,31 @@ private Mono> listSinglePageAsync( null)); } + /** + * List desktops. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return desktopList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + /** * List desktops. * @@ -596,9 +627,12 @@ private Mono> listSinglePageAsync( * @return desktopList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String applicationGroupName) { + private PagedFlux listAsync(String resourceGroupName, String applicationGroupName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, applicationGroupName), + () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -607,6 +641,9 @@ public PagedFlux listAsync(String resourceGroupName, String applic * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -614,9 +651,17 @@ public PagedFlux listAsync(String resourceGroupName, String applic * @return desktopList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String applicationGroupName, Context context) { + private PagedFlux listAsync( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, applicationGroupName, context), + () -> + listSinglePageAsync( + resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -632,7 +677,11 @@ private PagedFlux listAsync(String resourceGroupName, String appli */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String applicationGroupName) { - return new PagedIterable<>(listAsync(resourceGroupName, applicationGroupName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip)); } /** @@ -640,6 +689,9 @@ public PagedIterable list(String resourceGroupName, String applica * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -647,14 +699,22 @@ public PagedIterable list(String resourceGroupName, String applica * @return desktopList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String applicationGroupName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, applicationGroupName, context)); + public PagedIterable list( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context)); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -689,7 +749,8 @@ private Mono> listNextSinglePageAsync(String nextLin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopsImpl.java index 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..1c8f6d351423 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); @@ -198,7 +204,7 @@ Mono> listNext( * @return a host pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( + private Mono> getByResourceGroupWithResponseAsync( String resourceGroupName, String hostPoolName) { if (this.client.getEndpoint() == null) { return Mono @@ -292,7 +298,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @return a host pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String hostPoolName) { + private Mono getByResourceGroupAsync(String resourceGroupName, String hostPoolName) { return getByResourceGroupWithResponseAsync(resourceGroupName, hostPoolName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -302,14 +308,16 @@ public Mono getByResourceGroupAsync(String resourceGroupName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a host pool. + * @return a host pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HostPoolInner getByResourceGroup(String resourceGroupName, String hostPoolName) { - return getByResourceGroupAsync(resourceGroupName, hostPoolName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String hostPoolName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, hostPoolName, context).block(); } /** @@ -317,16 +325,14 @@ public HostPoolInner getByResourceGroup(String resourceGroupName, String hostPoo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a host pool along with {@link Response}. + * @return a host pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String hostPoolName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, hostPoolName, context).block(); + public HostPoolInner getByResourceGroup(String resourceGroupName, String hostPoolName) { + return getByResourceGroupWithResponse(resourceGroupName, hostPoolName, Context.NONE).getValue(); } /** @@ -341,7 +347,7 @@ public Response getByResourceGroupWithResponse( * @return represents a HostPool definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String hostPoolName, HostPoolInner hostPool) { if (this.client.getEndpoint() == null) { return Mono @@ -449,7 +455,7 @@ private Mono> createOrUpdateWithResponseAsync( * @return represents a HostPool definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String hostPoolName, HostPoolInner hostPool) { return createOrUpdateWithResponseAsync(resourceGroupName, hostPoolName, hostPool) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -461,14 +467,16 @@ public Mono createOrUpdateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param hostPool Object containing HostPool definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a HostPool definition. + * @return represents a HostPool definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HostPoolInner createOrUpdate(String resourceGroupName, String hostPoolName, HostPoolInner hostPool) { - return createOrUpdateAsync(resourceGroupName, hostPoolName, hostPool).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String hostPoolName, HostPoolInner hostPool, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, hostPoolName, hostPool, context).block(); } /** @@ -477,16 +485,14 @@ public HostPoolInner createOrUpdate(String resourceGroupName, String hostPoolNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param hostPool Object containing HostPool definitions. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a HostPool definition along with {@link Response}. + * @return represents a HostPool definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String hostPoolName, HostPoolInner hostPool, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, hostPoolName, hostPool, context).block(); + public HostPoolInner createOrUpdate(String resourceGroupName, String hostPoolName, HostPoolInner hostPool) { + return createOrUpdateWithResponse(resourceGroupName, hostPoolName, hostPool, Context.NONE).getValue(); } /** @@ -501,7 +507,7 @@ public Response createOrUpdateWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, Boolean force) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, Boolean force) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -591,14 +597,14 @@ private Mono> deleteWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. - * @param force Force flag to delete sessionHost. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String hostPoolName, Boolean force) { + private Mono deleteAsync(String resourceGroupName, String hostPoolName) { + final Boolean force = null; return deleteWithResponseAsync(resourceGroupName, hostPoolName, force).flatMap(ignored -> Mono.empty()); } @@ -607,15 +613,17 @@ public Mono deleteAsync(String resourceGroupName, String hostPoolName, Boo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param force Force flag to delete sessionHost. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String hostPoolName) { - final Boolean force = null; - return deleteWithResponseAsync(resourceGroupName, hostPoolName, force).flatMap(ignored -> Mono.empty()); + public Response deleteWithResponse( + String resourceGroupName, String hostPoolName, Boolean force, Context context) { + return deleteWithResponseAsync(resourceGroupName, hostPoolName, force, context).block(); } /** @@ -630,25 +638,7 @@ public Mono deleteAsync(String resourceGroupName, String hostPoolName) { @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String hostPoolName) { final Boolean force = null; - deleteAsync(resourceGroupName, hostPoolName, force).block(); - } - - /** - * Remove a host pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param force Force flag to delete sessionHost. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String hostPoolName, Boolean force, Context context) { - return deleteWithResponseAsync(resourceGroupName, hostPoolName, force, context).block(); + deleteWithResponse(resourceGroupName, hostPoolName, force, Context.NONE); } /** @@ -663,7 +653,7 @@ public Response deleteWithResponse( * @return represents a HostPool definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String hostPoolName, HostPoolPatch hostPool) { if (this.client.getEndpoint() == null) { return Mono @@ -760,14 +750,14 @@ private Mono> updateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. - * @param hostPool Object containing HostPool definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a HostPool definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String hostPoolName, HostPoolPatch hostPool) { + private Mono updateAsync(String resourceGroupName, String hostPoolName) { + final HostPoolPatch hostPool = null; return updateWithResponseAsync(resourceGroupName, hostPoolName, hostPool) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -777,16 +767,17 @@ public Mono updateAsync(String resourceGroupName, String hostPool * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param hostPool Object containing HostPool definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a HostPool definition on successful completion of {@link Mono}. + * @return represents a HostPool definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String hostPoolName) { - final HostPoolPatch hostPool = null; - return updateWithResponseAsync(resourceGroupName, hostPoolName, hostPool) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, String hostPoolName, HostPoolPatch hostPool, Context context) { + return updateWithResponseAsync(resourceGroupName, hostPoolName, hostPool, context).block(); } /** @@ -802,38 +793,24 @@ public Mono updateAsync(String resourceGroupName, String hostPool @ServiceMethod(returns = ReturnType.SINGLE) public HostPoolInner update(String resourceGroupName, String hostPoolName) { final HostPoolPatch hostPool = null; - return updateAsync(resourceGroupName, hostPoolName, hostPool).block(); - } - - /** - * Update a host pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param hostPool Object containing HostPool definitions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a HostPool definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String hostPoolName, HostPoolPatch hostPool, Context context) { - return updateWithResponseAsync(resourceGroupName, hostPoolName, hostPool, context).block(); + return updateWithResponse(resourceGroupName, hostPoolName, hostPool, Context.NONE).getValue(); } /** * List hostPools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return hostPoolList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -860,6 +837,9 @@ private Mono> listByResourceGroupSinglePageAsync(St this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -878,6 +858,9 @@ private Mono> listByResourceGroupSinglePageAsync(St * List hostPools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -886,7 +869,7 @@ private Mono> listByResourceGroupSinglePageAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -911,6 +894,9 @@ private Mono> listByResourceGroupSinglePageAsync( this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -928,15 +914,19 @@ private Mono> listByResourceGroupSinglePageAsync( * List hostPools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return hostPoolList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } @@ -944,6 +934,28 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupNam * List hostPools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hostPoolList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List hostPools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -951,9 +963,10 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupNam * @return hostPoolList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } @@ -968,13 +981,19 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, pageSize, isDescending, initialSkip)); } /** * List hostPools. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -982,19 +1001,26 @@ public PagedIterable listByResourceGroup(String resourceGroupName * @return hostPoolList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + public PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedIterable<>( + listByResourceGroupAsync(resourceGroupName, pageSize, isDescending, initialSkip, context)); } /** * List hostPools in subscription. * + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return hostPoolList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono> listSinglePageAsync( + Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1016,6 +1042,9 @@ private Mono> listSinglePageAsync() { this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -1033,6 +1062,9 @@ private Mono> listSinglePageAsync() { /** * List hostPools in subscription. * + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1040,7 +1072,8 @@ private Mono> listSinglePageAsync() { * @return hostPoolList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono> listSinglePageAsync( + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1060,6 +1093,9 @@ private Mono> listSinglePageAsync(Context context) this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -1076,18 +1112,44 @@ private Mono> listSinglePageAsync(Context context) /** * List hostPools in subscription. * + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return hostPoolList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * List hostPools in subscription. * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hostPoolList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List hostPools in subscription. + * + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1095,9 +1157,11 @@ public PagedFlux listAsync() { * @return hostPoolList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { + private PagedFlux listAsync( + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + () -> listSinglePageAsync(pageSize, isDescending, initialSkip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** @@ -1109,12 +1173,18 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listAsync(pageSize, isDescending, initialSkip)); } /** * List hostPools in subscription. * + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1122,8 +1192,9 @@ public PagedIterable list() { * @return hostPoolList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + public PagedIterable list( + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedIterable<>(listAsync(pageSize, isDescending, initialSkip, context)); } /** @@ -1138,7 +1209,7 @@ public PagedIterable list(Context context) { * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> retrieveRegistrationTokenWithResponseAsync( + private Mono> retrieveRegistrationTokenWithResponseAsync( String resourceGroupName, String hostPoolName) { if (this.client.getEndpoint() == null) { return Mono @@ -1233,7 +1304,7 @@ private Mono> retrieveRegistrationTokenWithRespo * @return represents a RegistrationInfo definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono retrieveRegistrationTokenAsync(String resourceGroupName, String hostPoolName) { + private Mono retrieveRegistrationTokenAsync(String resourceGroupName, String hostPoolName) { return retrieveRegistrationTokenWithResponseAsync(resourceGroupName, hostPoolName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1243,14 +1314,16 @@ public Mono retrieveRegistrationTokenAsync(String resourc * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a RegistrationInfo definition. + * @return represents a RegistrationInfo definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RegistrationInfoInner retrieveRegistrationToken(String resourceGroupName, String hostPoolName) { - return retrieveRegistrationTokenAsync(resourceGroupName, hostPoolName).block(); + public Response retrieveRegistrationTokenWithResponse( + String resourceGroupName, String hostPoolName, Context context) { + return retrieveRegistrationTokenWithResponseAsync(resourceGroupName, hostPoolName, context).block(); } /** @@ -1258,22 +1331,21 @@ public RegistrationInfoInner retrieveRegistrationToken(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a RegistrationInfo definition along with {@link Response}. + * @return represents a RegistrationInfo definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response retrieveRegistrationTokenWithResponse( - String resourceGroupName, String hostPoolName, Context context) { - return retrieveRegistrationTokenWithResponseAsync(resourceGroupName, hostPoolName, context).block(); + public RegistrationInfoInner retrieveRegistrationToken(String resourceGroupName, String hostPoolName) { + return retrieveRegistrationTokenWithResponse(resourceGroupName, hostPoolName, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1309,7 +1381,8 @@ private Mono> listByResourceGroupNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1346,7 +1419,8 @@ private Mono> listByResourceGroupNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1381,7 +1455,8 @@ private Mono> listNextSinglePageAsync(String nextLi /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolsImpl.java index 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..0d6b9ba1f3b1 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" @@ -224,7 +224,7 @@ private Mono> expandSinglePageAsync( * @return expandMsixImageList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux expandAsync( + private PagedFlux expandAsync( String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri) { return new PagedFlux<>( () -> expandSinglePageAsync(resourceGroupName, hostPoolName, msixImageUri), @@ -289,7 +289,8 @@ public PagedIterable expand( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -324,7 +325,8 @@ private Mono> expandNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackagesClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackagesClientImpl.java index 59c816ef50c0..7c71292d82e2 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); @@ -165,7 +168,7 @@ Mono> listNext( * @return a msixpackage along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String hostPoolName, String msixPackageFullName) { if (this.client.getEndpoint() == null) { return Mono @@ -271,7 +274,7 @@ private Mono> getWithResponseAsync( * @return a msixpackage on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName) { + private Mono getAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName) { return getWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -282,14 +285,16 @@ public Mono getAsync(String resourceGroupName, String hostPool * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a msixpackage. + * @return a msixpackage along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MsixPackageInner get(String resourceGroupName, String hostPoolName, String msixPackageFullName) { - return getAsync(resourceGroupName, hostPoolName, msixPackageFullName).block(); + public Response getWithResponse( + String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context) { + return getWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, context).block(); } /** @@ -298,16 +303,14 @@ public MsixPackageInner get(String resourceGroupName, String hostPoolName, Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a msixpackage along with {@link Response}. + * @return a msixpackage. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context) { - return getWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, context).block(); + public MsixPackageInner get(String resourceGroupName, String hostPoolName, String msixPackageFullName) { + return getWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, Context.NONE).getValue(); } /** @@ -323,7 +326,7 @@ public Response getWithResponse( * @return schema for MSIX Package properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage) { if (this.client.getEndpoint() == null) { return Mono @@ -447,7 +450,7 @@ private Mono> createOrUpdateWithResponseAsync( * @return schema for MSIX Package properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage) { return createOrUpdateWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -460,15 +463,22 @@ public Mono createOrUpdateAsync( * @param hostPoolName The name of the host pool within the specified resource group. * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. * @param msixPackage Object containing MSIX Package definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for MSIX Package properties. + * @return schema for MSIX Package properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MsixPackageInner createOrUpdate( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage) { - return createOrUpdateAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String hostPoolName, + String msixPackageFullName, + MsixPackageInner msixPackage, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, context) + .block(); } /** @@ -478,22 +488,17 @@ public MsixPackageInner createOrUpdate( * @param hostPoolName The name of the host pool within the specified resource group. * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. * @param msixPackage Object containing MSIX Package definitions. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for MSIX Package properties along with {@link Response}. + * @return schema for MSIX Package properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String hostPoolName, - String msixPackageFullName, - MsixPackageInner msixPackage, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, context) - .block(); + public MsixPackageInner createOrUpdate( + String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage) { + return createOrUpdateWithResponse( + resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, Context.NONE) + .getValue(); } /** @@ -508,7 +513,7 @@ public Response createOrUpdateWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( + private Mono> deleteWithResponseAsync( String resourceGroupName, String hostPoolName, String msixPackageFullName) { if (this.client.getEndpoint() == null) { return Mono @@ -614,7 +619,7 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName) { + private Mono deleteAsync(String resourceGroupName, String hostPoolName, String msixPackageFullName) { return deleteWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName) .flatMap(ignored -> Mono.empty()); } @@ -625,13 +630,16 @@ public Mono deleteAsync(String resourceGroupName, String hostPoolName, Str * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String hostPoolName, String msixPackageFullName) { - deleteAsync(resourceGroupName, hostPoolName, msixPackageFullName).block(); + public Response deleteWithResponse( + String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context) { + return deleteWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, context).block(); } /** @@ -640,16 +648,13 @@ public void delete(String resourceGroupName, String hostPoolName, String msixPac * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context) { - return deleteWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, context).block(); + public void delete(String resourceGroupName, String hostPoolName, String msixPackageFullName) { + deleteWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, Context.NONE); } /** @@ -665,7 +670,7 @@ public Response deleteWithResponse( * @return schema for MSIX Package properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackagePatch msixPackage) { if (this.client.getEndpoint() == null) { return Mono @@ -778,15 +783,15 @@ private Mono> updateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param msixPackage Object containing MSIX Package definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return schema for MSIX Package properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackagePatch msixPackage) { + private Mono updateAsync( + String resourceGroupName, String hostPoolName, String msixPackageFullName) { + final MsixPackagePatch msixPackage = null; return updateWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -797,17 +802,22 @@ public Mono updateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. + * @param msixPackage Object containing MSIX Package definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for MSIX Package properties on successful completion of {@link Mono}. + * @return schema for MSIX Package properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName) { - final MsixPackagePatch msixPackage = null; - return updateWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, + String hostPoolName, + String msixPackageFullName, + MsixPackagePatch msixPackage, + Context context) { + return updateWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, context) + .block(); } /** @@ -824,31 +834,8 @@ public Mono updateAsync( @ServiceMethod(returns = ReturnType.SINGLE) public MsixPackageInner update(String resourceGroupName, String hostPoolName, String msixPackageFullName) { final MsixPackagePatch msixPackage = null; - return updateAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage).block(); - } - - /** - * Update an MSIX Package. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param msixPackageFullName The version specific package full name of the MSIX package within specified hostpool. - * @param msixPackage Object containing MSIX Package definitions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schema for MSIX Package properties along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String hostPoolName, - String msixPackageFullName, - MsixPackagePatch msixPackage, - Context context) { - return updateWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, context) - .block(); + return updateWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, Context.NONE) + .getValue(); } /** @@ -856,13 +843,17 @@ public Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return msixPackageList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String hostPoolName) { + private Mono> listSinglePageAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -893,6 +884,9 @@ private Mono> listSinglePageAsync(String resourc this.client.getSubscriptionId(), resourceGroupName, hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -912,6 +906,9 @@ private Mono> listSinglePageAsync(String resourc * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -920,7 +917,12 @@ private Mono> listSinglePageAsync(String resourc */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String hostPoolName, Context context) { + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -949,6 +951,9 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -967,15 +972,20 @@ private Mono> listSinglePageAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return msixPackageList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String hostPoolName) { + private PagedFlux listAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, hostPoolName), nextLink -> listNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -983,6 +993,29 @@ public PagedFlux listAsync(String resourceGroupName, String ho * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return msixPackageList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List MSIX packages in hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -990,9 +1023,15 @@ public PagedFlux listAsync(String resourceGroupName, String ho * @return msixPackageList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String hostPoolName, Context context) { + private PagedFlux listAsync( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, hostPoolName, context), + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -1008,7 +1047,10 @@ private PagedFlux listAsync(String resourceGroupName, String h */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String hostPoolName) { - return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip)); } /** @@ -1016,6 +1058,9 @@ public PagedIterable list(String resourceGroupName, String hos * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1023,14 +1068,22 @@ public PagedIterable list(String resourceGroupName, String hos * @return msixPackageList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String hostPoolName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName, context)); + public PagedIterable list( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context)); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1065,7 +1118,8 @@ private Mono> listNextSinglePageAsync(String nex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackagesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackagesImpl.java index 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..2b4fc1f8678a 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}) @@ -150,7 +150,7 @@ private Mono> listSinglePageAsync( * @return result of the request to list operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { + private PagedFlux listAsync() { return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -198,7 +198,8 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -234,7 +235,8 @@ private Mono> listNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsClientImpl.java index df76637056b8..5dc35751293e 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) { + private 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) { + private 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) + private 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) { + private 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) + private 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( + private 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( + private 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) { + private 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) + private PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, 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) { + private 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) + private 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) { + private 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) + private 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( + private 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( + private 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..8ffb09e8d7ee 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) { + private 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) + private 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) { + private 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) + private PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, 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..2bd129216e28 --- /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) + private Mono> getWithResponseAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPooledSchedule along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + accept, + context); + } + + /** + * Get a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPooledSchedule on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + return getWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPooledSchedule along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + return getWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context).block(); + } + + /** + * Get a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScalingPlanPooledSchedule. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScalingPlanPooledScheduleInner get( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + return getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE).getValue(); + } + + /** + * Create or update a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPooledSchedule definitions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPooledSchedule definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner scalingPlanSchedule) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + if (scalingPlanSchedule == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanSchedule is required and cannot be null.")); + } else { + scalingPlanSchedule.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .create( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + scalingPlanSchedule, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPooledSchedule definitions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPooledSchedule definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner scalingPlanSchedule, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + if (scalingPlanSchedule == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanSchedule is required and cannot be null.")); + } else { + scalingPlanSchedule.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .create( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + scalingPlanSchedule, + accept, + context); + } + + /** + * Create or update a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPooledSchedule definitions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPooledSchedule definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner scalingPlanSchedule) { + return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create or update a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPooledSchedule definitions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPooledSchedule definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createWithResponse( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner scalingPlanSchedule, + Context context) { + return createWithResponseAsync( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, context) + .block(); + } + + /** + * Create or update a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPooledSchedule definitions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPooledSchedule definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScalingPlanPooledScheduleInner create( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledScheduleInner scalingPlanSchedule) { + return createWithResponse( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, Context.NONE) + .getValue(); + } + + /** + * Remove a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Remove a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + accept, + context); + } + + /** + * Remove a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + return deleteWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Remove a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + return deleteWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context).block(); + } + + /** + * Remove a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + deleteWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE); + } + + /** + * Update a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPooledSchedule definitions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPooledSchedule definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledSchedulePatch scalingPlanSchedule) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + if (scalingPlanSchedule != null) { + scalingPlanSchedule.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + scalingPlanSchedule, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPooledSchedule definitions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPooledSchedule definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledSchedulePatch scalingPlanSchedule, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + if (scalingPlanScheduleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); + } + if (scalingPlanSchedule != null) { + scalingPlanSchedule.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + scalingPlanScheduleName, + scalingPlanSchedule, + accept, + context); + } + + /** + * Update a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPooledSchedule definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + final ScalingPlanPooledSchedulePatch scalingPlanSchedule = null; + return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @param scalingPlanSchedule Object containing ScalingPlanPooledSchedule definitions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPooledSchedule definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String scalingPlanName, + String scalingPlanScheduleName, + ScalingPlanPooledSchedulePatch scalingPlanSchedule, + Context context) { + return updateWithResponseAsync( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, context) + .block(); + } + + /** + * Update a ScalingPlanPooledSchedule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a ScalingPlanPooledSchedule definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScalingPlanPooledScheduleInner update( + String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + final ScalingPlanPooledSchedulePatch scalingPlanSchedule = null; + return updateWithResponse( + resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, Context.NONE) + .getValue(); + } + + /** + * List ScalingPlanPooledSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPooledScheduleList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String scalingPlanName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + pageSize, + isDescending, + initialSkip, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List ScalingPlanPooledSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPooledScheduleList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String scalingPlanName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scalingPlanName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + scalingPlanName, + pageSize, + isDescending, + initialSkip, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List ScalingPlanPooledSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPooledScheduleList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String scalingPlanName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List ScalingPlanPooledSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPooledScheduleList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String scalingPlanName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List ScalingPlanPooledSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPooledScheduleList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String scalingPlanName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List ScalingPlanPooledSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPooledScheduleList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String scalingPlanName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip)); + } + + /** + * List ScalingPlanPooledSchedules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scalingPlanName The name of the scaling plan. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPooledScheduleList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String scalingPlanName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanPooledScheduleList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPooledSchedulesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPooledSchedulesImpl.java new file mode 100644 index 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..1c0c865c7b68 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); @@ -205,7 +214,7 @@ Mono> listByHostPoolNext( * @return a scaling plan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( + private Mono> getByResourceGroupWithResponseAsync( String resourceGroupName, String scalingPlanName) { if (this.client.getEndpoint() == null) { return Mono @@ -301,7 +310,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @return a scaling plan on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String scalingPlanName) { + private Mono getByResourceGroupAsync(String resourceGroupName, String scalingPlanName) { return getByResourceGroupWithResponseAsync(resourceGroupName, scalingPlanName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -311,14 +320,16 @@ public Mono getByResourceGroupAsync(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scaling plan. + * @return a scaling plan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScalingPlanInner getByResourceGroup(String resourceGroupName, String scalingPlanName) { - return getByResourceGroupAsync(resourceGroupName, scalingPlanName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String scalingPlanName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, scalingPlanName, context).block(); } /** @@ -326,16 +337,14 @@ public ScalingPlanInner getByResourceGroup(String resourceGroupName, String scal * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a scaling plan along with {@link Response}. + * @return a scaling plan. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String scalingPlanName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, scalingPlanName, context).block(); + public ScalingPlanInner getByResourceGroup(String resourceGroupName, String scalingPlanName) { + return getByResourceGroupWithResponse(resourceGroupName, scalingPlanName, Context.NONE).getValue(); } /** @@ -350,7 +359,7 @@ public Response getByResourceGroupWithResponse( * @return scalingPlan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync( + private Mono> createWithResponseAsync( String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan) { if (this.client.getEndpoint() == null) { return Mono @@ -460,7 +469,7 @@ private Mono> createWithResponseAsync( * @return scalingPlan on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync( + private Mono createAsync( String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan) { return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -472,14 +481,16 @@ public Mono createAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlan Object containing scaling plan definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlan. + * @return scalingPlan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScalingPlanInner create(String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan) { - return createAsync(resourceGroupName, scalingPlanName, scalingPlan).block(); + public Response createWithResponse( + String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan, Context context) { + return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan, context).block(); } /** @@ -488,16 +499,14 @@ public ScalingPlanInner create(String resourceGroupName, String scalingPlanName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlan Object containing scaling plan definitions. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlan along with {@link Response}. + * @return scalingPlan. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan, Context context) { - return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan, context).block(); + public ScalingPlanInner create(String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan) { + return createWithResponse(resourceGroupName, scalingPlanName, scalingPlan, Context.NONE).getValue(); } /** @@ -511,7 +520,7 @@ public Response createWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String scalingPlanName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String scalingPlanName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -606,7 +615,7 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String scalingPlanName) { + private Mono deleteAsync(String resourceGroupName, String scalingPlanName) { return deleteWithResponseAsync(resourceGroupName, scalingPlanName).flatMap(ignored -> Mono.empty()); } @@ -615,13 +624,15 @@ public Mono deleteAsync(String resourceGroupName, String scalingPlanName) * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String scalingPlanName) { - deleteAsync(resourceGroupName, scalingPlanName).block(); + public Response deleteWithResponse(String resourceGroupName, String scalingPlanName, Context context) { + return deleteWithResponseAsync(resourceGroupName, scalingPlanName, context).block(); } /** @@ -629,15 +640,13 @@ public void delete(String resourceGroupName, String scalingPlanName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String scalingPlanName, Context context) { - return deleteWithResponseAsync(resourceGroupName, scalingPlanName, context).block(); + public void delete(String resourceGroupName, String scalingPlanName) { + deleteWithResponse(resourceGroupName, scalingPlanName, Context.NONE); } /** @@ -652,7 +661,7 @@ public Response deleteWithResponse(String resourceGroupName, String scalin * @return scalingPlan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan) { if (this.client.getEndpoint() == null) { return Mono @@ -751,15 +760,14 @@ private Mono> updateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. - * @param scalingPlan Object containing scaling plan definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return scalingPlan on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan) { + private Mono updateAsync(String resourceGroupName, String scalingPlanName) { + final ScalingPlanPatch scalingPlan = null; return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -769,16 +777,17 @@ public Mono updateAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. + * @param scalingPlan Object containing scaling plan definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlan on successful completion of {@link Mono}. + * @return scalingPlan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String scalingPlanName) { - final ScalingPlanPatch scalingPlan = null; - return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan, Context context) { + return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan, context).block(); } /** @@ -794,38 +803,24 @@ public Mono updateAsync(String resourceGroupName, String scali @ServiceMethod(returns = ReturnType.SINGLE) public ScalingPlanInner update(String resourceGroupName, String scalingPlanName) { final ScalingPlanPatch scalingPlan = null; - return updateAsync(resourceGroupName, scalingPlanName, scalingPlan).block(); - } - - /** - * Update a scaling plan. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scalingPlanName The name of the scaling plan. - * @param scalingPlan Object containing scaling plan definitions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlan along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan, Context context) { - return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan, context).block(); + return updateWithResponse(resourceGroupName, scalingPlanName, scalingPlan, Context.NONE).getValue(); } /** * List scaling plans. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return scalingPlanList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -852,6 +847,9 @@ private Mono> listByResourceGroupSinglePageAsync this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -870,6 +868,9 @@ private Mono> listByResourceGroupSinglePageAsync * List scaling plans. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -878,7 +879,7 @@ private Mono> listByResourceGroupSinglePageAsync */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -903,6 +904,9 @@ private Mono> listByResourceGroupSinglePageAsync this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -916,6 +920,26 @@ private Mono> listByResourceGroupSinglePageAsync null)); } + /** + * List scaling plans. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + /** * List scaling plans. * @@ -926,9 +950,12 @@ private Mono> listByResourceGroupSinglePageAsync * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } @@ -936,6 +963,9 @@ public PagedFlux listByResourceGroupAsync(String resourceGroup * List scaling plans. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -943,9 +973,10 @@ public PagedFlux listByResourceGroupAsync(String resourceGroup * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } @@ -960,13 +991,19 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, pageSize, isDescending, initialSkip)); } /** * List scaling plans. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -974,19 +1011,26 @@ public PagedIterable listByResourceGroup(String resourceGroupN * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + public PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedIterable<>( + listByResourceGroupAsync(resourceGroupName, pageSize, isDescending, initialSkip, context)); } /** * List scaling plans in subscription. * + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return scalingPlanList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono> listSinglePageAsync( + Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1008,6 +1052,9 @@ private Mono> listSinglePageAsync() { this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -1025,6 +1072,9 @@ private Mono> listSinglePageAsync() { /** * List scaling plans in subscription. * + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1032,7 +1082,8 @@ private Mono> listSinglePageAsync() { * @return scalingPlanList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono> listSinglePageAsync( + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1052,6 +1103,9 @@ private Mono> listSinglePageAsync(Context contex this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -1068,19 +1122,44 @@ private Mono> listSinglePageAsync(Context contex /** * List scaling plans in subscription. * + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { + private PagedFlux listAsync(Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(pageSize, isDescending, initialSkip), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * List scaling plans in subscription. * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(pageSize, isDescending, initialSkip), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List scaling plans in subscription. + * + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1088,9 +1167,11 @@ public PagedFlux listAsync() { * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { + private PagedFlux listAsync( + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + () -> listSinglePageAsync(pageSize, isDescending, initialSkip, context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** @@ -1102,12 +1183,18 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listAsync(pageSize, isDescending, initialSkip)); } /** * List scaling plans in subscription. * + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1115,8 +1202,9 @@ public PagedIterable list() { * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + public PagedIterable list( + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedIterable<>(listAsync(pageSize, isDescending, initialSkip, context)); } /** @@ -1124,6 +1212,9 @@ public PagedIterable list(Context context) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1131,7 +1222,7 @@ public PagedIterable list(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, String hostPoolName) { + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1162,6 +1253,9 @@ private Mono> listByHostPoolSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -1181,6 +1275,9 @@ private Mono> listByHostPoolSinglePageAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1189,7 +1286,12 @@ private Mono> listByHostPoolSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, String hostPoolName, Context context) { + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1218,6 +1320,9 @@ private Mono> listByHostPoolSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -1231,6 +1336,27 @@ private Mono> listByHostPoolSinglePageAsync( null)); } + /** + * List scaling plan associated with hostpool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return scalingPlanList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByHostPoolAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); + } + /** * List scaling plan associated with hostpool. * @@ -1242,9 +1368,12 @@ private Mono> listByHostPoolSinglePageAsync( * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName) { + private PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName), + () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); } @@ -1253,6 +1382,9 @@ public PagedFlux listByHostPoolAsync(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1261,9 +1393,16 @@ public PagedFlux listByHostPoolAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName, Context context) { + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, context), + () -> + listByHostPoolSinglePageAsync( + resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); } @@ -1279,7 +1418,11 @@ private PagedFlux listByHostPoolAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName) { - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, hostPoolName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip)); } /** @@ -1287,6 +1430,9 @@ public PagedIterable listByHostPool(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1295,14 +1441,21 @@ public PagedIterable listByHostPool(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName, Context context) { - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, hostPoolName, context)); + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context)); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1338,7 +1491,8 @@ private Mono> listByResourceGroupNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1375,7 +1529,8 @@ private Mono> listByResourceGroupNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1411,7 +1566,8 @@ private Mono> listBySubscriptionNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1448,7 +1604,8 @@ private Mono> listBySubscriptionNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1483,7 +1640,8 @@ private Mono> listByHostPoolNextSinglePageAsync( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlansImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlansImpl.java index 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..66a10cf6ef21 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); @@ -149,7 +152,7 @@ Mono> listNext( * @return a session host along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname) { if (this.client.getEndpoint() == null) { return Mono @@ -255,7 +258,7 @@ private Mono> getWithResponseAsync( * @return a session host on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String hostPoolName, String sessionHostname) { + private Mono getAsync(String resourceGroupName, String hostPoolName, String sessionHostname) { return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -266,14 +269,16 @@ public Mono getAsync(String resourceGroupName, String hostPool * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a session host. + * @return a session host along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SessionHostInner get(String resourceGroupName, String hostPoolName, String sessionHostname) { - return getAsync(resourceGroupName, hostPoolName, sessionHostname).block(); + public Response getWithResponse( + String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { + return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, context).block(); } /** @@ -282,16 +287,14 @@ public SessionHostInner get(String resourceGroupName, String hostPoolName, Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a session host along with {@link Response}. + * @return a session host. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { - return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, context).block(); + public SessionHostInner get(String resourceGroupName, String hostPoolName, String sessionHostname) { + return getWithResponse(resourceGroupName, hostPoolName, sessionHostname, Context.NONE).getValue(); } /** @@ -307,7 +310,7 @@ public Response getWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( + private Mono> deleteWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force) { if (this.client.getEndpoint() == null) { return Mono @@ -410,15 +413,14 @@ private Mono> deleteWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to force sessionHost deletion even when userSession exists. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force) { + private Mono deleteAsync(String resourceGroupName, String hostPoolName, String sessionHostname) { + final Boolean force = null; return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force) .flatMap(ignored -> Mono.empty()); } @@ -429,16 +431,17 @@ public Mono deleteAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. + * @param force Force flag to force sessionHost deletion even when userSession exists. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String hostPoolName, String sessionHostname) { - final Boolean force = null; - return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force) - .flatMap(ignored -> Mono.empty()); + public Response deleteWithResponse( + String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force, Context context) { + return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, context).block(); } /** @@ -454,26 +457,7 @@ public Mono deleteAsync(String resourceGroupName, String hostPoolName, Str @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String hostPoolName, String sessionHostname) { final Boolean force = null; - deleteAsync(resourceGroupName, hostPoolName, sessionHostname, force).block(); - } - - /** - * Remove a SessionHost. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to force sessionHost deletion even when userSession exists. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force, Context context) { - return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, context).block(); + deleteWithResponse(resourceGroupName, hostPoolName, sessionHostname, force, Context.NONE); } /** @@ -490,7 +474,7 @@ public Response deleteWithResponse( * @return represents a SessionHost definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname, @@ -611,20 +595,15 @@ private Mono> updateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to update assign, unassign or reassign personal desktop. - * @param sessionHost Object containing SessionHost definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a SessionHost definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Boolean force, - SessionHostPatch sessionHost) { + private Mono updateAsync(String resourceGroupName, String hostPoolName, String sessionHostname) { + final Boolean force = null; + final SessionHostPatch sessionHost = null; return updateWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -635,17 +614,24 @@ public Mono updateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. + * @param force Force flag to update assign, unassign or reassign personal desktop. + * @param sessionHost Object containing SessionHost definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SessionHost definition on successful completion of {@link Mono}. + * @return represents a SessionHost definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String hostPoolName, String sessionHostname) { - final Boolean force = null; - final SessionHostPatch sessionHost = null; - return updateWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Boolean force, + SessionHostPatch sessionHost, + Context context) { + return updateWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost, context) + .block(); } /** @@ -663,33 +649,8 @@ public Mono updateAsync(String resourceGroupName, String hostP public SessionHostInner update(String resourceGroupName, String hostPoolName, String sessionHostname) { final Boolean force = null; final SessionHostPatch sessionHost = null; - return updateAsync(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost).block(); - } - - /** - * Update a session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param force Force flag to update assign, unassign or reassign personal desktop. - * @param sessionHost Object containing SessionHost definitions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SessionHost definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Boolean force, - SessionHostPatch sessionHost, - Context context) { - return updateWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost, context) - .block(); + return updateWithResponse(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost, Context.NONE) + .getValue(); } /** @@ -697,13 +658,17 @@ public Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return sessionHostList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String hostPoolName) { + private Mono> listSinglePageAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -734,6 +699,9 @@ private Mono> listSinglePageAsync(String resourc this.client.getSubscriptionId(), resourceGroupName, hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -753,6 +721,9 @@ private Mono> listSinglePageAsync(String resourc * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -761,7 +732,12 @@ private Mono> listSinglePageAsync(String resourc */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String hostPoolName, Context context) { + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -790,6 +766,9 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, hostPoolName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -808,15 +787,20 @@ private Mono> listSinglePageAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return sessionHostList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String hostPoolName) { + private PagedFlux listAsync( + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, hostPoolName), nextLink -> listNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -824,6 +808,29 @@ public PagedFlux listAsync(String resourceGroupName, String ho * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sessionHostList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String hostPoolName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List sessionHosts. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -831,9 +838,15 @@ public PagedFlux listAsync(String resourceGroupName, String ho * @return sessionHostList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String hostPoolName, Context context) { + private PagedFlux listAsync( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, hostPoolName, context), + () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -849,7 +862,10 @@ private PagedFlux listAsync(String resourceGroupName, String h */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String hostPoolName) { - return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip)); } /** @@ -857,6 +873,9 @@ public PagedIterable list(String resourceGroupName, String hos * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -864,14 +883,22 @@ public PagedIterable list(String resourceGroupName, String hos * @return sessionHostList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String hostPoolName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName, context)); + public PagedIterable list( + String resourceGroupName, + String hostPoolName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context)); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -906,7 +933,8 @@ private Mono> listNextSinglePageAsync(String nex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostsImpl.java index 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..c18c1745acea 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( @@ -201,15 +225,43 @@ private Mono> listSinglePageAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return startMenuItemList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(String resourceGroupName, String applicationGroupName) { + private PagedFlux listAsync( + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List start menu items in the given application group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param applicationGroupName The name of the application group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return startMenuItemList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String applicationGroupName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, applicationGroupName), + () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -218,6 +270,9 @@ public PagedFlux listAsync(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -226,9 +281,16 @@ public PagedFlux listAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String applicationGroupName, Context context) { + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, applicationGroupName, context), + () -> + listSinglePageAsync( + resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -244,7 +306,11 @@ private PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String applicationGroupName) { - return new PagedIterable<>(listAsync(resourceGroupName, applicationGroupName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip)); } /** @@ -252,6 +318,9 @@ public PagedIterable list(String resourceGroupName, String a * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -260,14 +329,21 @@ public PagedIterable list(String resourceGroupName, String a */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String resourceGroupName, String applicationGroupName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, applicationGroupName, context)); + String resourceGroupName, + String applicationGroupName, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context)); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -302,7 +378,8 @@ private Mono> listNextSinglePageAsync(String n /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemsImpl.java index 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..eeae5689b4dc 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,16 +339,26 @@ private Mono> listByHostPoolSinglePageAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return userSessionList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName, String filter) { + private PagedFlux listByHostPoolAsync( + String resourceGroupName, + String hostPoolName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, filter), + () -> + listByHostPoolSinglePageAsync( + resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip), nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); } @@ -334,10 +373,15 @@ public PagedFlux listByHostPoolAsync( * @return userSessionList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName) { + private PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName) { final String filter = null; + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, filter), + () -> + listByHostPoolSinglePageAsync( + resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip), nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); } @@ -347,6 +391,9 @@ public PagedFlux listByHostPoolAsync(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -355,9 +402,17 @@ public PagedFlux listByHostPoolAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName, String filter, Context context) { + String resourceGroupName, + String hostPoolName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, filter, context), + () -> + listByHostPoolSinglePageAsync( + resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip, context), nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); } @@ -374,7 +429,11 @@ private PagedFlux listByHostPoolAsync( @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName) { final String filter = null; - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, hostPoolName, filter)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip)); } /** @@ -383,6 +442,9 @@ public PagedIterable listByHostPool(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -391,8 +453,15 @@ public PagedIterable listByHostPool(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName, String filter, Context context) { - return new PagedIterable<>(listByHostPoolAsync(resourceGroupName, hostPoolName, filter, context)); + String resourceGroupName, + String hostPoolName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listByHostPoolAsync(resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip, context)); } /** @@ -408,7 +477,7 @@ public PagedIterable listByHostPool( * @return a userSession along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { if (this.client.getEndpoint() == null) { return Mono @@ -524,7 +593,7 @@ private Mono> getWithResponseAsync( * @return a userSession on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( + private Mono getAsync( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -537,15 +606,16 @@ public Mono getAsync( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a userSession. + * @return a userSession along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UserSessionInner get( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { - return getAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId).block(); + public Response getWithResponse( + String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { + return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, context).block(); } /** @@ -555,16 +625,16 @@ public UserSessionInner get( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a userSession along with {@link Response}. + * @return a userSession. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { - return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, context).block(); + public UserSessionInner get( + String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + return getWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, Context.NONE) + .getValue(); } /** @@ -581,7 +651,7 @@ public Response getWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( + private Mono> deleteWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Boolean force) { if (this.client.getEndpoint() == null) { return Mono @@ -699,33 +769,13 @@ private Mono> deleteWithResponseAsync( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. - * @param force Force flag to login off userSession. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Boolean force) { - return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Remove a userSession. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync( + private Mono deleteAsync( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { final Boolean force = null; return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force) @@ -739,14 +789,23 @@ public Mono deleteAsync( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. + * @param force Force flag to login off userSession. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { - final Boolean force = null; - deleteAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force).block(); + public Response deleteWithResponse( + String resourceGroupName, + String hostPoolName, + String sessionHostname, + String userSessionId, + Boolean force, + Context context) { + return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force, context) + .block(); } /** @@ -756,23 +815,14 @@ public void delete(String resourceGroupName, String hostPoolName, String session * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. - * @param force Force flag to login off userSession. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - Boolean force, - Context context) { - return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force, context) - .block(); + public void delete(String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + final Boolean force = null; + deleteWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force, Context.NONE); } /** @@ -781,6 +831,9 @@ public Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -788,7 +841,12 @@ public Response deleteWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String hostPoolName, String sessionHostname) { + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -824,6 +882,9 @@ private Mono> listSinglePageAsync( resourceGroupName, hostPoolName, sessionHostname, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -844,6 +905,9 @@ private Mono> listSinglePageAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -852,7 +916,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -886,6 +956,9 @@ private Mono> listSinglePageAsync( resourceGroupName, hostPoolName, sessionHostname, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -899,6 +972,35 @@ private Mono> listSinglePageAsync( null)); } + /** + * List userSessions. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param hostPoolName The name of the host pool within the specified resource group. + * @param sessionHostname The name of the session host within the specified host pool. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return userSessionList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + /** * List userSessions. * @@ -911,10 +1013,15 @@ private Mono> listSinglePageAsync( * @return userSessionList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync( + private PagedFlux listAsync( String resourceGroupName, String hostPoolName, String sessionHostname) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, hostPoolName, sessionHostname), + () -> + listSinglePageAsync( + resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -924,6 +1031,9 @@ public PagedFlux listAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -932,9 +1042,17 @@ public PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, hostPoolName, sessionHostname, context), + () -> + listSinglePageAsync( + resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -951,7 +1069,11 @@ private PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String hostPoolName, String sessionHostname) { - return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName, sessionHostname)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>( + listAsync(resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip)); } /** @@ -960,6 +1082,9 @@ public PagedIterable list(String resourceGroupName, String hos * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -968,8 +1093,15 @@ public PagedIterable list(String resourceGroupName, String hos */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, hostPoolName, sessionHostname, context)); + String resourceGroupName, + String hostPoolName, + String sessionHostname, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip, context)); } /** @@ -985,7 +1117,7 @@ public PagedIterable list( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> disconnectWithResponseAsync( + private Mono> disconnectWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { if (this.client.getEndpoint() == null) { return Mono @@ -1101,7 +1233,7 @@ private Mono> disconnectWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono disconnectAsync( + private Mono disconnectAsync( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { return disconnectWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId) .flatMap(ignored -> Mono.empty()); @@ -1114,14 +1246,17 @@ public Mono disconnectAsync( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void disconnect( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { - disconnectAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId).block(); + public Response disconnectWithResponse( + String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { + return disconnectWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, context) + .block(); } /** @@ -1131,17 +1266,14 @@ public void disconnect( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response disconnectWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { - return disconnectWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, context) - .block(); + public void disconnect( + String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + disconnectWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, Context.NONE); } /** @@ -1158,7 +1290,7 @@ public Response disconnectWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> sendMessageWithResponseAsync( + private Mono> sendMessageWithResponseAsync( String resourceGroupName, String hostPoolName, String sessionHostname, @@ -1286,19 +1418,15 @@ private Mono> sendMessageWithResponseAsync( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. - * @param sendMessage Object containing message includes title and message body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono sendMessageAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - SendMessage sendMessage) { + private Mono sendMessageAsync( + String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + final SendMessage sendMessage = null; return sendMessageWithResponseAsync( resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage) .flatMap(ignored -> Mono.empty()); @@ -1311,18 +1439,24 @@ public Mono sendMessageAsync( * @param hostPoolName The name of the host pool within the specified resource group. * @param sessionHostname The name of the session host within the specified host pool. * @param userSessionId The name of the user session within the specified session host. + * @param sendMessage Object containing message includes title and message body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono sendMessageAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { - final SendMessage sendMessage = null; + public Response sendMessageWithResponse( + String resourceGroupName, + String hostPoolName, + String sessionHostname, + String userSessionId, + SendMessage sendMessage, + Context context) { return sendMessageWithResponseAsync( - resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage) - .flatMap(ignored -> Mono.empty()); + resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage, context) + .block(); } /** @@ -1340,40 +1474,15 @@ public Mono sendMessageAsync( public void sendMessage( String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { final SendMessage sendMessage = null; - sendMessageAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage).block(); - } - - /** - * Send a message to a user. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group. - * @param sessionHostname The name of the session host within the specified host pool. - * @param userSessionId The name of the user session within the specified session host. - * @param sendMessage Object containing message includes title and message body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response sendMessageWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - SendMessage sendMessage, - Context context) { - return sendMessageWithResponseAsync( - resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage, context) - .block(); + sendMessageWithResponse( + resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage, Context.NONE); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1408,7 +1517,8 @@ private Mono> listByHostPoolNextSinglePageAsync( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1444,7 +1554,8 @@ private Mono> listByHostPoolNextSinglePageAsync( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1479,7 +1590,8 @@ private Mono> listNextSinglePageAsync(String nex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionsImpl.java index 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..d6a27b78c37c 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); @@ -180,7 +183,7 @@ Mono> listBySubscriptionNext( * @return a workspace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( + private Mono> getByResourceGroupWithResponseAsync( String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { return Mono @@ -274,7 +277,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @return a workspace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { + private Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -284,14 +287,16 @@ public Mono getByResourceGroupAsync(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workspace. + * @return a workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { - return getByResourceGroupAsync(resourceGroupName, workspaceName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -299,16 +304,14 @@ public WorkspaceInner getByResourceGroup(String resourceGroupName, String worksp * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workspace along with {@link Response}. + * @return a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { + return getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** @@ -323,7 +326,7 @@ public Response getByResourceGroupWithResponse( * @return represents a Workspace definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, WorkspaceInner workspace) { if (this.client.getEndpoint() == null) { return Mono @@ -431,7 +434,7 @@ private Mono> createOrUpdateWithResponseAsync( * @return represents a Workspace definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String workspaceName, WorkspaceInner workspace) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, workspace) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -443,14 +446,16 @@ public Mono createOrUpdateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param workspace Object containing Workspace definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Workspace definition. + * @return represents a Workspace definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner workspace) { - return createOrUpdateAsync(resourceGroupName, workspaceName, workspace).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, WorkspaceInner workspace, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, workspace, context).block(); } /** @@ -459,16 +464,14 @@ public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param workspace Object containing Workspace definitions. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Workspace definition along with {@link Response}. + * @return represents a Workspace definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, WorkspaceInner workspace, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, workspace, context).block(); + public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner workspace) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, workspace, Context.NONE).getValue(); } /** @@ -482,7 +485,7 @@ public Response createOrUpdateWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -575,7 +578,7 @@ private Mono> deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String workspaceName) { + private Mono deleteAsync(String resourceGroupName, String workspaceName) { return deleteWithResponseAsync(resourceGroupName, workspaceName).flatMap(ignored -> Mono.empty()); } @@ -584,13 +587,15 @@ public Mono deleteAsync(String resourceGroupName, String workspaceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName) { - deleteAsync(resourceGroupName, workspaceName).block(); + public Response deleteWithResponse(String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -598,15 +603,13 @@ public void delete(String resourceGroupName, String workspaceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public void delete(String resourceGroupName, String workspaceName) { + deleteWithResponse(resourceGroupName, workspaceName, Context.NONE); } /** @@ -621,7 +624,7 @@ public Response deleteWithResponse(String resourceGroupName, String worksp * @return represents a Workspace definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String workspaceName, WorkspacePatch workspace) { if (this.client.getEndpoint() == null) { return Mono @@ -718,14 +721,14 @@ private Mono> updateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param workspace Object containing Workspace definitions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a Workspace definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String workspaceName, WorkspacePatch workspace) { + private Mono updateAsync(String resourceGroupName, String workspaceName) { + final WorkspacePatch workspace = null; return updateWithResponseAsync(resourceGroupName, workspaceName, workspace) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -735,16 +738,17 @@ public Mono updateAsync(String resourceGroupName, String workspa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param workspace Object containing Workspace definitions. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Workspace definition on successful completion of {@link Mono}. + * @return represents a Workspace definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String workspaceName) { - final WorkspacePatch workspace = null; - return updateWithResponseAsync(resourceGroupName, workspaceName, workspace) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, String workspaceName, WorkspacePatch workspace, Context context) { + return updateWithResponseAsync(resourceGroupName, workspaceName, workspace, context).block(); } /** @@ -760,38 +764,24 @@ public Mono updateAsync(String resourceGroupName, String workspa @ServiceMethod(returns = ReturnType.SINGLE) public WorkspaceInner update(String resourceGroupName, String workspaceName) { final WorkspacePatch workspace = null; - return updateAsync(resourceGroupName, workspaceName, workspace).block(); - } - - /** - * Update a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param workspace Object containing Workspace definitions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Workspace definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String workspaceName, WorkspacePatch workspace, Context context) { - return updateWithResponseAsync(resourceGroupName, workspaceName, workspace, context).block(); + return updateWithResponse(resourceGroupName, workspaceName, workspace, Context.NONE).getValue(); } /** * List workspaces. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return workspaceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -818,6 +808,9 @@ private Mono> listByResourceGroupSinglePageAsync(S this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + pageSize, + isDescending, + initialSkip, accept, context)) .>map( @@ -836,6 +829,9 @@ private Mono> listByResourceGroupSinglePageAsync(S * List workspaces. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -844,7 +840,7 @@ private Mono> listByResourceGroupSinglePageAsync(S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -869,6 +865,9 @@ private Mono> listByResourceGroupSinglePageAsync( this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + pageSize, + isDescending, + initialSkip, accept, context) .map( @@ -882,6 +881,26 @@ private Mono> listByResourceGroupSinglePageAsync( null)); } + /** + * List workspaces. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return workspaceList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + /** * List workspaces. * @@ -892,9 +911,12 @@ private Mono> listByResourceGroupSinglePageAsync( * @return workspaceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } @@ -902,6 +924,9 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupNa * List workspaces. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -909,9 +934,10 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupNa * @return workspaceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } @@ -926,13 +952,19 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupN */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + final Integer pageSize = null; + final Boolean isDescending = null; + final Integer initialSkip = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, pageSize, isDescending, initialSkip)); } /** * List workspaces. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -940,8 +972,10 @@ public PagedIterable listByResourceGroup(String resourceGroupNam * @return workspaceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + public PagedIterable listByResourceGroup( + String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedIterable<>( + listByResourceGroupAsync(resourceGroupName, pageSize, isDescending, initialSkip, context)); } /** @@ -1039,7 +1073,7 @@ private Mono> listSinglePageAsync(Context context) * @return workspaceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync() { + private PagedFlux listAsync() { return new PagedFlux<>( () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } @@ -1088,7 +1122,8 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1124,7 +1159,8 @@ private Mono> listByResourceGroupNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1161,7 +1197,8 @@ private Mono> listByResourceGroupNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1197,7 +1234,8 @@ private Mono> listBySubscriptionNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspacesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspacesImpl.java index 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..a1d618e71c44 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ApplicationGroupType. */ +/** Resource Type of ApplicationGroup. */ public final class ApplicationGroupType extends ExpandableStringEnum { /** Static value RemoteApp for ApplicationGroupType. */ public static final ApplicationGroupType REMOTE_APP = fromString("RemoteApp"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroups.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroups.java index 33ee144da156..d4b001edc24d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroups.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroups.java @@ -15,50 +15,51 @@ public interface ApplicationGroups { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application group. + * @return an application group along with {@link Response}. */ - ApplicationGroup getByResourceGroup(String resourceGroupName, String applicationGroupName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String applicationGroupName, Context context); /** * Get an application group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application group along with {@link Response}. + * @return an application group. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String applicationGroupName, Context context); + ApplicationGroup getByResourceGroup(String resourceGroupName, String applicationGroupName); /** * Remove an applicationGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void deleteByResourceGroup(String resourceGroupName, String applicationGroupName); + Response deleteByResourceGroupWithResponse( + String resourceGroupName, String applicationGroupName, Context context); /** * Remove an applicationGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String applicationGroupName, Context context); + void deleteByResourceGroup(String resourceGroupName, String applicationGroupName); /** * List applicationGroups. @@ -76,13 +77,22 @@ Response getByResourceGroupWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. + * @param pageSize Number of items per page. + * @param isDescending Indicates whether the collection is descending. + * @param initialSkip Initial number of items to skip. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return applicationGroupList as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context); + PagedIterable listByResourceGroup( + String resourceGroupName, + String filter, + Integer pageSize, + Boolean isDescending, + Integer initialSkip, + Context context); /** * List applicationGroups in subscription. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationList.java index 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..263396caee75 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ApplicationType. */ +/** Application type of application. */ public final class ApplicationType extends ExpandableStringEnum { /** Static value RemoteApp for ApplicationType. */ public static final ApplicationType REMOTE_APP = fromString("RemoteApp"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Applications.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Applications.java index 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..d4a7188379e7 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/CommandLineSetting.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/CommandLineSetting.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for CommandLineSetting. */ +/** + * Specifies whether this published application can be launched with command line arguments provided by the client, + * command line arguments specified at publish time, or no command line arguments at all. + */ public final class CommandLineSetting extends ExpandableStringEnum { /** Static value DoNotAllow for CommandLineSetting. */ public static final CommandLineSetting DO_NOT_ALLOW = fromString("DoNotAllow"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DayOfWeek.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DayOfWeek.java new file mode 100644 index 000000000000..e7a4324672a1 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DayOfWeek.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Day of the week. */ +public enum DayOfWeek { + /** Enum value Monday. */ + MONDAY("Monday"), + + /** Enum value Tuesday. */ + TUESDAY("Tuesday"), + + /** Enum value Wednesday. */ + WEDNESDAY("Wednesday"), + + /** Enum value Thursday. */ + THURSDAY("Thursday"), + + /** Enum value Friday. */ + FRIDAY("Friday"), + + /** Enum value Saturday. */ + SATURDAY("Saturday"), + + /** Enum value Sunday. */ + SUNDAY("Sunday"); + + /** The actual serialized value for a DayOfWeek instance. */ + private final String value; + + DayOfWeek(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DayOfWeek instance. + * + * @param value the serialized value to parse. + * @return the parsed DayOfWeek object, or null if unable to parse. + */ + @JsonCreator + public static DayOfWeek fromString(String value) { + if (value == null) { + return null; + } + DayOfWeek[] items = DayOfWeek.values(); + for (DayOfWeek item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** {@inheritDoc} */ + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopList.java index db5b33efe4f3..ba3adad3bccd 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopList.java @@ -9,7 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** DesktopList List of Desktop definitions. */ +/** + * DesktopList + * + *

List of Desktop definitions. + */ @Fluent public final class DesktopList { /* @@ -24,6 +28,10 @@ public final class DesktopList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of DesktopList class. */ + public DesktopList() { + } + /** * Get the value property: List of Desktop definitions. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopPatch.java index 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..595adcb77955 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HealthCheckName.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HealthCheckName.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for HealthCheckName. */ +/** Represents the name of the health check operation performed. */ public final class HealthCheckName extends ExpandableStringEnum { /** Static value DomainJoinedCheck for HealthCheckName. */ public static final HealthCheckName DOMAIN_JOINED_CHECK = fromString("DomainJoinedCheck"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HealthCheckResult.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HealthCheckResult.java index 6ce4002a1c27..e92669104bce 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HealthCheckResult.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HealthCheckResult.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for HealthCheckResult. */ +/** Represents the Health state of the health check we performed. */ public final class HealthCheckResult extends ExpandableStringEnum { /** Static value Unknown for HealthCheckResult. */ public static final HealthCheckResult UNKNOWN = fromString("Unknown"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPool.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPool.java index 16155e74e693..31adc21655a1 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPool.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPool.java @@ -241,13 +241,6 @@ public interface HostPool { */ Boolean startVMOnConnect(); - /** - * Gets the migrationRequest property: The registration info of HostPool. - * - * @return the migrationRequest value. - */ - MigrationRequestProperties migrationRequest(); - /** * Gets the cloudPcResource property: Is cloud pc resource. * @@ -261,7 +254,23 @@ public interface HostPool { * * @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 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..e3cdb96da854 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for HostPoolType. */ +/** HostPool type for desktop. */ public final class HostPoolType extends ExpandableStringEnum { /** Static value Personal for HostPoolType. */ public static final HostPoolType PERSONAL = fromString("Personal"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPools.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPools.java index 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..d4253b28c441 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostpoolPublicNetworkAccess.java @@ -0,0 +1,48 @@ +// Copyright (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 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..32205544065d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LoadBalancerType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LoadBalancerType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for LoadBalancerType. */ +/** The type of the load balancer. */ public final class LoadBalancerType extends ExpandableStringEnum { /** Static value BreadthFirst for LoadBalancerType. */ public static final LoadBalancerType BREADTH_FIRST = fromString("BreadthFirst"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LogSpecification.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LogSpecification.java index 3d34e2c48256..f431828f285d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LogSpecification.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LogSpecification.java @@ -28,6 +28,10 @@ public final class LogSpecification { @JsonProperty(value = "blobDuration") private String blobDuration; + /** Creates an instance of LogSpecification class. */ + public LogSpecification() { + } + /** * Get the name property: Name of the log. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MaintenanceWindowPatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MaintenanceWindowPatchProperties.java new file mode 100644 index 000000000000..b2fe15817df3 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MaintenanceWindowPatchProperties.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Maintenance window starting hour and day of week. */ +@Fluent +public final class MaintenanceWindowPatchProperties { + /* + * The update start hour of the day. (0 - 23) + */ + @JsonProperty(value = "hour") + private Integer hour; + + /* + * Day of the week. + */ + @JsonProperty(value = "dayOfWeek") + private DayOfWeek dayOfWeek; + + /** Creates an instance of MaintenanceWindowPatchProperties class. */ + public MaintenanceWindowPatchProperties() { + } + + /** + * Get the hour property: The update start hour of the day. (0 - 23). + * + * @return the hour value. + */ + public Integer hour() { + return this.hour; + } + + /** + * Set the hour property: The update start hour of the day. (0 - 23). + * + * @param hour the hour value to set. + * @return the MaintenanceWindowPatchProperties object itself. + */ + public MaintenanceWindowPatchProperties withHour(Integer hour) { + this.hour = hour; + return this; + } + + /** + * Get the dayOfWeek property: Day of the week. + * + * @return the dayOfWeek value. + */ + public DayOfWeek dayOfWeek() { + return this.dayOfWeek; + } + + /** + * Set the dayOfWeek property: Day of the week. + * + * @param dayOfWeek the dayOfWeek value to set. + * @return the MaintenanceWindowPatchProperties object itself. + */ + public MaintenanceWindowPatchProperties withDayOfWeek(DayOfWeek dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MaintenanceWindowProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MaintenanceWindowProperties.java new file mode 100644 index 000000000000..6b9223fe4dab --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MaintenanceWindowProperties.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Maintenance window starting hour and day of week. */ +@Fluent +public final class MaintenanceWindowProperties { + /* + * The update start hour of the day. (0 - 23) + */ + @JsonProperty(value = "hour") + private Integer hour; + + /* + * Day of the week. + */ + @JsonProperty(value = "dayOfWeek") + private DayOfWeek dayOfWeek; + + /** Creates an instance of MaintenanceWindowProperties class. */ + public MaintenanceWindowProperties() { + } + + /** + * Get the hour property: The update start hour of the day. (0 - 23). + * + * @return the hour value. + */ + public Integer hour() { + return this.hour; + } + + /** + * Set the hour property: The update start hour of the day. (0 - 23). + * + * @param hour the hour value to set. + * @return the MaintenanceWindowProperties object itself. + */ + public MaintenanceWindowProperties withHour(Integer hour) { + this.hour = hour; + return this; + } + + /** + * Get the dayOfWeek property: Day of the week. + * + * @return the dayOfWeek value. + */ + public DayOfWeek dayOfWeek() { + return this.dayOfWeek; + } + + /** + * Set the dayOfWeek property: Day of the week. + * + * @param dayOfWeek the dayOfWeek value to set. + * @return the MaintenanceWindowProperties object itself. + */ + public MaintenanceWindowProperties withDayOfWeek(DayOfWeek dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MigrationRequestProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MigrationRequestProperties.java deleted file mode 100644 index 247d6ad36767..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MigrationRequestProperties.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties for arm migration. */ -@Fluent -public final class MigrationRequestProperties { - /* - * The type of operation for migration. - */ - @JsonProperty(value = "operation") - private Operation operation; - - /* - * The path to the legacy object to migrate. - */ - @JsonProperty(value = "migrationPath") - private String migrationPath; - - /** - * Get the operation property: The type of operation for migration. - * - * @return the operation value. - */ - public Operation operation() { - return this.operation; - } - - /** - * Set the operation property: The type of operation for migration. - * - * @param operation the operation value to set. - * @return the MigrationRequestProperties object itself. - */ - public MigrationRequestProperties withOperation(Operation operation) { - this.operation = operation; - return this; - } - - /** - * Get the migrationPath property: The path to the legacy object to migrate. - * - * @return the migrationPath value. - */ - public String migrationPath() { - return this.migrationPath; - } - - /** - * Set the migrationPath property: The path to the legacy object to migrate. - * - * @param migrationPath the migrationPath value to set. - * @return the MigrationRequestProperties object itself. - */ - public MigrationRequestProperties withMigrationPath(String migrationPath) { - this.migrationPath = migrationPath; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixImageUri.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixImageUri.java index a889f77772a2..bc38ad3b1f9c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixImageUri.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixImageUri.java @@ -16,6 +16,10 @@ public final class MsixImageUri { @JsonProperty(value = "uri") private String uri; + /** Creates an instance of MsixImageUri class. */ + public MsixImageUri() { + } + /** * Get the uri property: URI to Image. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageApplications.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageApplications.java index bea9c81578d9..fd29936acefe 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageApplications.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageApplications.java @@ -24,8 +24,7 @@ public final class MsixPackageApplications { private String description; /* - * Used to activate Package Application. Consists of Package Name and - * ApplicationID. Found in appxmanifest.xml. + * Used to activate Package Application. Consists of Package Name and ApplicationID. Found in appxmanifest.xml. */ @JsonProperty(value = "appUserModelID") private String appUserModelId; @@ -54,6 +53,10 @@ public final class MsixPackageApplications { @JsonProperty(value = "rawPng") private byte[] rawPng; + /** Creates an instance of MsixPackageApplications class. */ + public MsixPackageApplications() { + } + /** * Get the appId property: Package Application Id, found in appxmanifest.xml. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageDependencies.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageDependencies.java index 9f712981f7d8..8947f3932601 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageDependencies.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageDependencies.java @@ -28,6 +28,10 @@ public final class MsixPackageDependencies { @JsonProperty(value = "minVersion") private String minVersion; + /** Creates an instance of MsixPackageDependencies class. */ + public MsixPackageDependencies() { + } + /** * Get the dependencyName property: Name of package dependency. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageList.java index ba85ce08091b..8cb5af5ada0e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageList.java @@ -9,7 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** MsixPackageList List of MSIX Package definitions. */ +/** + * MsixPackageList + * + *

List of MSIX Package definitions. + */ @Fluent public final class MsixPackageList { /* @@ -24,6 +28,10 @@ public final class MsixPackageList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of MsixPackageList class. */ + public MsixPackageList() { + } + /** * Get the value property: List of MSIX Package definitions. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackagePatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackagePatch.java index 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..af15d2357baf 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PersonalDesktopAssignmentType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PersonalDesktopAssignmentType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PersonalDesktopAssignmentType. */ +/** PersonalDesktopAssignment type for HostPool. */ public final class PersonalDesktopAssignmentType extends ExpandableStringEnum { /** Static value Automatic for PersonalDesktopAssignmentType. */ public static final PersonalDesktopAssignmentType AUTOMATIC = fromString("Automatic"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Plan.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Plan.java index d0304c2fcba7..8de430f2313c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Plan.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Plan.java @@ -18,23 +18,20 @@ public class Plan { private String name; /* - * The publisher of the 3rd Party Artifact that is being bought. E.g. - * NewRelic + * The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic */ @JsonProperty(value = "publisher", required = true) private String publisher; /* - * The 3rd Party artifact that is being procured. E.g. NewRelic. Product - * maps to the OfferID specified for the artifact at the time of Data - * Market onboarding. + * The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the + * artifact at the time of Data Market onboarding. */ @JsonProperty(value = "product", required = true) private String product; /* - * A publisher provided promotion code as provisioned in Data Market for - * the said product/artifact. + * A publisher provided promotion code as provisioned in Data Market for the said product/artifact. */ @JsonProperty(value = "promotionCode") private String promotionCode; @@ -45,6 +42,10 @@ public class Plan { @JsonProperty(value = "version") private String version; + /** Creates an instance of Plan class. */ + public Plan() { + } + /** * Get the name property: A user defined name of the 3rd Party Artifact that is being procured. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PreferredAppGroupType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PreferredAppGroupType.java index 1e30ad981d1c..acff713aa462 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PreferredAppGroupType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PreferredAppGroupType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PreferredAppGroupType. */ +/** The type of preferred application group type, default to Desktop Application Group. */ public final class PreferredAppGroupType extends ExpandableStringEnum { /** Static value None for PreferredAppGroupType. */ public static final PreferredAppGroupType NONE = fromString("None"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpoint.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpoint.java index d5deb1033652..f05bf19fa1b7 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpoint.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpoint.java @@ -16,6 +16,10 @@ public final class PrivateEndpoint { @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; + /** Creates an instance of PrivateEndpoint class. */ + public PrivateEndpoint() { + } + /** * Get the id property: The ARM identifier for Private Endpoint. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnection.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnection.java index 0b143f836245..40f1ca1cd7b7 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnection.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnection.java @@ -18,6 +18,10 @@ public class PrivateEndpointConnection extends ProxyResource { @JsonProperty(value = "properties") private PrivateEndpointConnectionProperties innerProperties; + /** Creates an instance of PrivateEndpointConnection class. */ + public PrivateEndpointConnection() { + } + /** * Get the innerProperties property: Resource properties. * @@ -85,21 +89,6 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Set the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @param provisioningState the provisioningState value to set. - * @return the PrivateEndpointConnection object itself. - */ - public PrivateEndpointConnection withProvisioningState( - PrivateEndpointConnectionProvisioningState provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); - return this; - } - /** * Validates the instance. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionListResultWithSystemData.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionListResultWithSystemData.java index 64111d04b8c9..482663f331fb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionListResultWithSystemData.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionListResultWithSystemData.java @@ -24,6 +24,10 @@ public final class PrivateEndpointConnectionListResultWithSystemData { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of PrivateEndpointConnectionListResultWithSystemData class. */ + public PrivateEndpointConnectionListResultWithSystemData() { + } + /** * Get the value property: Array of private endpoint connections. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionProvisioningState.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionProvisioningState.java index 431baa083f8d..7ed398916d10 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionProvisioningState.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PrivateEndpointConnectionProvisioningState. */ +/** The current provisioning state. */ public final class PrivateEndpointConnectionProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ 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..2a2faee8eb52 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. */ 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..d5cfa2c52906 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"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationInfoPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationInfoPatch.java index db1838355a7e..6c2a45bfd2b5 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationInfoPatch.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationInfoPatch.java @@ -23,6 +23,10 @@ public final class RegistrationInfoPatch { @JsonProperty(value = "registrationTokenOperation") private RegistrationTokenOperation registrationTokenOperation; + /** Creates an instance of RegistrationInfoPatch class. */ + public RegistrationInfoPatch() { + } + /** * Get the expirationTime property: Expiration time of registration token. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationTokenOperation.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationTokenOperation.java index 544d8c78d89b..43e3cefb68a4 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationTokenOperation.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationTokenOperation.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RegistrationTokenOperation. */ +/** The type of resetting the token. */ public final class RegistrationTokenOperation extends ExpandableStringEnum { /** Static value Delete for RegistrationTokenOperation. */ public static final RegistrationTokenOperation DELETE = fromString("Delete"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RemoteApplicationType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RemoteApplicationType.java index f9ce502b0422..14f33535d672 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RemoteApplicationType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RemoteApplicationType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RemoteApplicationType. */ +/** Resource Type of Application. */ public final class RemoteApplicationType extends ExpandableStringEnum { /** Static value InBuilt for RemoteApplicationType. */ public static final RemoteApplicationType IN_BUILT = fromString("InBuilt"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceIdentityType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceIdentityType.java index e68e5471002a..8254c935fc57 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceIdentityType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceIdentityType.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for ResourceIdentityType. */ +/** The identity type. */ public enum ResourceIdentityType { /** Enum value SystemAssigned. */ SYSTEM_ASSIGNED("SystemAssigned"); @@ -27,6 +27,9 @@ public enum ResourceIdentityType { */ @JsonCreator public static ResourceIdentityType fromString(String value) { + if (value == null) { + return null; + } ResourceIdentityType[] items = ResourceIdentityType.values(); for (ResourceIdentityType item : items) { if (item.toString().equalsIgnoreCase(value)) { @@ -36,6 +39,7 @@ public static ResourceIdentityType fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySet.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySet.java index 2cbbcde64ca5..f9d419cfd776 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySet.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySet.java @@ -16,31 +16,26 @@ @Fluent public class ResourceModelWithAllowedPropertySet extends Resource { /* - * The fully qualified resource ID of the resource that manages this - * resource. Indicates if this resource is managed by another Azure - * resource. If this is present, complete mode deployment will not delete - * the resource if it is removed from the template since it is managed by - * another resource. + * The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is + * managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if + * it is removed from the template since it is managed by another resource. */ @JsonProperty(value = "managedBy") private String managedBy; /* - * Metadata used by portal/tooling/etc to render different UX experiences - * for resources of the same type; e.g. ApiApps are a kind of - * Microsoft.Web/sites type. If supported, the resource provider must - * validate and persist this value. + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. + * ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist + * this value. */ @JsonProperty(value = "kind") private String kind; /* - * The etag field is *not* required. If it is provided in the response - * body, it must also be provided as a header per the normal etag - * convention. Entity tags are used for comparing two or more entities - * from the same requested resource. HTTP/1.1 uses entity tags in the etag - * (section 14.19), If-Match (section 14.24), If-None-Match (section - * 14.26), and If-Range (section 14.27) header fields. + * The etag field is *not* required. If it is provided in the response body, it must also be provided as a header + * per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested + * resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match + * (section 14.26), and If-Range (section 14.27) header fields. */ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag; @@ -63,6 +58,10 @@ public class ResourceModelWithAllowedPropertySet extends Resource { @JsonProperty(value = "plan") private ResourceModelWithAllowedPropertySetPlan plan; + /** Creates an instance of ResourceModelWithAllowedPropertySet class. */ + public ResourceModelWithAllowedPropertySet() { + } + /** * Get the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetIdentity.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetIdentity.java index 16ff33b98e65..bdc0ecc78c19 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetIdentity.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetIdentity.java @@ -9,6 +9,10 @@ /** The ResourceModelWithAllowedPropertySetIdentity model. */ @Fluent public class ResourceModelWithAllowedPropertySetIdentity extends Identity { + /** Creates an instance of ResourceModelWithAllowedPropertySetIdentity class. */ + public ResourceModelWithAllowedPropertySetIdentity() { + } + /** {@inheritDoc} */ @Override public ResourceModelWithAllowedPropertySetIdentity withType(ResourceIdentityType type) { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetPlan.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetPlan.java index 2c156f2a4940..5d11137579bd 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetPlan.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetPlan.java @@ -9,6 +9,10 @@ /** The ResourceModelWithAllowedPropertySetPlan model. */ @Fluent public final class ResourceModelWithAllowedPropertySetPlan extends Plan { + /** Creates an instance of ResourceModelWithAllowedPropertySetPlan class. */ + public ResourceModelWithAllowedPropertySetPlan() { + } + /** {@inheritDoc} */ @Override public ResourceModelWithAllowedPropertySetPlan withName(String name) { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetSku.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetSku.java index 5fd01a6fe6e5..2ec2cc8ec542 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetSku.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetSku.java @@ -9,6 +9,10 @@ /** The ResourceModelWithAllowedPropertySetSku model. */ @Fluent public final class ResourceModelWithAllowedPropertySetSku extends Sku { + /** Creates an instance of ResourceModelWithAllowedPropertySetSku class. */ + public ResourceModelWithAllowedPropertySetSku() { + } + /** {@inheritDoc} */ @Override public ResourceModelWithAllowedPropertySetSku withName(String name) { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationDisplay.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationDisplay.java index b4726d48564d..560241227dcd 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationDisplay.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationDisplay.java @@ -34,6 +34,10 @@ public final class ResourceProviderOperationDisplay { @JsonProperty(value = "description") private String description; + /** Creates an instance of ResourceProviderOperationDisplay class. */ + public ResourceProviderOperationDisplay() { + } + /** * Get the provider property: Resource provider: Microsoft Desktop Virtualization. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationList.java index 85156746bca3..bdca1b7e5ebb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationList.java @@ -24,6 +24,10 @@ public final class ResourceProviderOperationList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ResourceProviderOperationList class. */ + public ResourceProviderOperationList() { + } + /** * Get the value property: List of operations supported by this resource provider. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolReference.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolReference.java index 4df9316cad23..a30a6af5a87d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolReference.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolReference.java @@ -22,6 +22,10 @@ public final class ScalingHostPoolReference { @JsonProperty(value = "scalingPlanEnabled") private Boolean scalingPlanEnabled; + /** Creates an instance of ScalingHostPoolReference class. */ + public ScalingHostPoolReference() { + } + /** * Get the hostPoolArmPath property: Arm path of referenced hostpool. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolType.java index 05e1dda8387f..e631c2efad3b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingHostPoolType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScalingHostPoolType. */ +/** HostPool type for desktop. */ public final class ScalingHostPoolType extends ExpandableStringEnum { /** Static value Pooled for ScalingHostPoolType. */ public static final ScalingHostPoolType POOLED = fromString("Pooled"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlan.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlan.java index 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/SendMessage.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SendMessage.java index 34d22d5021e7..83d0d8e3b8bf 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SendMessage.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SendMessage.java @@ -22,6 +22,10 @@ public final class SendMessage { @JsonProperty(value = "messageBody") private String messageBody; + /** Creates an instance of SendMessage class. */ + public SendMessage() { + } + /** * Get the messageTitle property: Title of message. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ServiceSpecification.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ServiceSpecification.java index 503207d9978c..83dc76eef9db 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ServiceSpecification.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ServiceSpecification.java @@ -17,6 +17,10 @@ public final class ServiceSpecification { @JsonProperty(value = "logSpecifications") private List logSpecifications; + /** Creates an instance of ServiceSpecification class. */ + public ServiceSpecification() { + } + /** * Get the logSpecifications property: Specifications of the Log for Azure Monitoring. * diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHost.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHost.java index 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..00183897f561 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostComponentUpdateType.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The type of maintenance for session host components. */ +public final class SessionHostComponentUpdateType extends ExpandableStringEnum { + /** Static value Default for SessionHostComponentUpdateType. */ + public static final SessionHostComponentUpdateType DEFAULT = fromString("Default"); + + /** Static value Scheduled for SessionHostComponentUpdateType. */ + public static final SessionHostComponentUpdateType SCHEDULED = fromString("Scheduled"); + + /** + * Creates or finds a SessionHostComponentUpdateType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SessionHostComponentUpdateType. + */ + @JsonCreator + public static SessionHostComponentUpdateType fromString(String name) { + return fromString(name, SessionHostComponentUpdateType.class); + } + + /** + * Gets known SessionHostComponentUpdateType values. + * + * @return known SessionHostComponentUpdateType values. + */ + public static Collection values() { + return values(SessionHostComponentUpdateType.class); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostHealthCheckFailureDetails.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostHealthCheckFailureDetails.java index 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..3ff03741011b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostLoadBalancingAlgorithm.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostLoadBalancingAlgorithm.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SessionHostLoadBalancingAlgorithm. */ +/** Load balancing algorithm for ramp up period. */ public final class SessionHostLoadBalancingAlgorithm extends ExpandableStringEnum { /** Static value BreadthFirst for SessionHostLoadBalancingAlgorithm. */ public static final SessionHostLoadBalancingAlgorithm BREADTH_FIRST = fromString("BreadthFirst"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostPatch.java index 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..8596b608b8f0 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionState.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SessionState. */ +/** State of user session. */ public final class SessionState extends ExpandableStringEnum { /** Static value Unknown for SessionState. */ public static final SessionState UNKNOWN = fromString("Unknown"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Sku.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Sku.java index 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..579420b907d4 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SsoSecretType.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SsoSecretType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SsoSecretType. */ +/** The type of single sign on Secret Type. */ public final class SsoSecretType extends ExpandableStringEnum { /** Static value SharedKey for SsoSecretType. */ public static final SsoSecretType SHARED_KEY = fromString("SharedKey"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItemList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItemList.java index 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..761fc74699b0 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Status.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Status.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Status. */ +/** Status for a SessionHost. */ public final class Status extends ExpandableStringEnum { /** Static value Available for Status. */ public static final Status AVAILABLE = fromString("Available"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StopHostsWhen.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StopHostsWhen.java index 0bfe4a6e3aab..832aca155379 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StopHostsWhen.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StopHostsWhen.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for StopHostsWhen. */ +/** Specifies when to stop hosts during ramp down period. */ public final class StopHostsWhen extends ExpandableStringEnum { /** Static value ZeroSessions for StopHostsWhen. */ public static final StopHostsWhen ZERO_SESSIONS = fromString("ZeroSessions"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Time.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Time.java index 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..12955a479415 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UpdateState.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UpdateState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for UpdateState. */ +/** Update state of a SessionHost. */ public final class UpdateState extends ExpandableStringEnum { /** Static value Initial for UpdateState. */ public static final UpdateState INITIAL = fromString("Initial"); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSessionList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSessionList.java index 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..7296a84a8967 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ApplicationGroups Delete. */ public final class ApplicationGroupsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ApplicationGroup_Delete.json */ /** * Sample code: ApplicationGroup_Delete. @@ -18,6 +18,8 @@ public final class ApplicationGroupsDeleteSamples { */ public static void applicationGroupDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applicationGroups().deleteWithResponse("resourceGroup1", "applicationGroup1", Context.NONE); + manager + .applicationGroups() + .deleteByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java index 2ccf2d393cd8..b35317583658 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for ApplicationGroups GetByResourceGroup. */ public final class ApplicationGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ApplicationGroup_Get.json */ /** * Sample code: ApplicationGroup_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java index 24de765ad64f..a8bbb0c1c6d8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for ApplicationGroups ListByResourceGroup. */ public final class ApplicationGroupsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ApplicationGroup_ListByResourceGroup.json */ /** * Sample code: ApplicationGroup_ListByResourceGroup. @@ -20,6 +20,7 @@ public static void applicationGroupListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager .applicationGroups() - .listByResourceGroup("resourceGroup1", "applicationGroupType eq 'RailApplication'", Context.NONE); + .listByResourceGroup( + "resourceGroup1", "applicationGroupType eq 'RailApplication'", 10, true, 0, Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java index e1d1a1a960d3..5de93b2beef8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java @@ -9,7 +9,7 @@ /** Samples for ApplicationGroups List. */ public final class ApplicationGroupsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ApplicationGroup_ListBySubscription.json */ /** * Sample code: ApplicationGroup_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsUpdateSamples.java index f2fa4c53d032..b8ebe0243299 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for ApplicationGroups Update. */ public final class ApplicationGroupsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ApplicationGroup_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ApplicationGroup_Update.json */ /** * Sample code: ApplicationGroups_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateSamples.java index 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..09b7ca5bc567 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Applications Delete. */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Application_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Application_Delete.json */ /** * Sample code: Application_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java index 3a2b9c760654..d953066c91d5 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Applications Get. */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Application_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Application_Get.json */ /** * Sample code: Application_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java index 3d7b03f696fe..55fadf1f7838 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Applications List. */ public final class ApplicationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Application_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Application_List.json */ /** * Sample code: Applications_List. @@ -18,6 +18,6 @@ public final class ApplicationsListSamples { */ public static void applicationsList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.applications().list("resourceGroup1", "applicationGroup1", Context.NONE); + manager.applications().list("resourceGroup1", "applicationGroup1", 10, true, 0, Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsUpdateSamples.java index 46c663075cdc..614e5af4f362 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for Applications Update. */ public final class ApplicationsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Application_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Application_Update.json */ /** * Sample code: Application_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetSamples.java index 37d3d65196ee..c783599d711f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Desktops Get. */ public final class DesktopsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Desktop_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Desktop_Get.json */ /** * Sample code: Desktop_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java index 5a62924a11d9..359d1addfa3f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Desktops List. */ public final class DesktopsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Desktop_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Desktop_List.json */ /** * Sample code: Desktop_List. @@ -18,6 +18,6 @@ public final class DesktopsListSamples { */ public static void desktopList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.desktops().list("resourceGroup1", "applicationGroup1", Context.NONE); + manager.desktops().list("resourceGroup1", "applicationGroup1", 10, true, 0, Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateSamples.java index b2f8158a5d75..9e99f87e0ad5 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for Desktops Update. */ public final class DesktopsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Desktop_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Desktop_Update.json */ /** * Sample code: Desktop_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsCreateOrUpdateSamples.java index 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..9c869eec9055 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for HostPools Delete. */ public final class HostPoolsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/HostPool_Delete.json */ /** * Sample code: HostPool_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java index 73be37854039..9b09a2704521 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for HostPools GetByResourceGroup. */ public final class HostPoolsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/HostPool_Get.json */ /** * Sample code: HostPool_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java index 57b3331bdc4d..d3219141f1a8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for HostPools ListByResourceGroup. */ public final class HostPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/HostPool_ListByResourceGroup.json */ /** * Sample code: HostPool_ListByResourceGroup. @@ -18,6 +18,6 @@ public final class HostPoolsListByResourceGroupSamples { */ public static void hostPoolListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.hostPools().listByResourceGroup("resourceGroup1", Context.NONE); + manager.hostPools().listByResourceGroup("resourceGroup1", 10, true, 0, Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListSamples.java index 7f31eba0b35d..9a63885cc44d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListSamples.java @@ -9,7 +9,7 @@ /** Samples for HostPools List. */ public final class HostPoolsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/HostPool_List.json */ /** * Sample code: HostPool_List. @@ -18,6 +18,6 @@ public final class HostPoolsListSamples { */ public static void hostPoolList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.hostPools().list(Context.NONE); + manager.hostPools().list(10, true, 0, Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java index 1217d7455f89..d137494a562d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java @@ -9,7 +9,7 @@ /** Samples for HostPools RetrieveRegistrationToken. */ public final class HostPoolsRetrieveRegistrationTokenSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPools_RetrieveRegistrationToken_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/HostPools_RetrieveRegistrationToken_Post.json */ /** * Sample code: HostPools_RetrieveRegistrationToken_Post. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsUpdateSamples.java index 8a2d17b55fa6..35477b774dcc 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsUpdateSamples.java @@ -5,21 +5,25 @@ package com.azure.resourcemanager.desktopvirtualization.generated; import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdatePatchProperties; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; import com.azure.resourcemanager.desktopvirtualization.models.HostPool; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; +import com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowPatchProperties; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfoPatch; import com.azure.resourcemanager.desktopvirtualization.models.RegistrationTokenOperation; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHostComponentUpdateType; import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for HostPools Update. */ public final class HostPoolsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/HostPool_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/HostPool_Update.json */ /** * Sample code: HostPool_Update. @@ -48,7 +52,16 @@ public static void hostPoolUpdate( .withSsoClientSecretKeyVaultPath("https://keyvault/secret") .withSsoSecretType(SsoSecretType.SHARED_KEY) .withStartVMOnConnect(false) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .withAgentUpdate( + new AgentUpdatePatchProperties() + .withType(SessionHostComponentUpdateType.SCHEDULED) + .withUseSessionHostLocalTime(false) + .withMaintenanceWindowTimeZone("Alaskan Standard Time") + .withMaintenanceWindows( + Arrays + .asList( + new MaintenanceWindowPatchProperties().withHour(7).withDayOfWeek(DayOfWeek.FRIDAY), + new MaintenanceWindowPatchProperties().withHour(8).withDayOfWeek(DayOfWeek.SATURDAY)))) .apply(); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandSamples.java index d2029ac6ce98..fa86f5863b9a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandSamples.java @@ -10,7 +10,7 @@ /** Samples for MsixImages Expand. */ public final class MsixImagesExpandSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixImage_Expand_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/MsixImage_Expand_Post.json */ /** * Sample code: MsixImage_Expand. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateSamples.java index 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..cd7b1301cfa7 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for MsixPackages Delete. */ public final class MsixPackagesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/MsixPackage_Delete.json */ /** * Sample code: MSIXPackage_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java index be0b911b0b24..2abc86ed1fee 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for MsixPackages Get. */ public final class MsixPackagesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/MsixPackage_Get.json */ /** * Sample code: MSIXPackage_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java index dbc4807f2cec..5f478c48b674 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java @@ -9,7 +9,7 @@ /** Samples for MsixPackages List. */ public final class MsixPackagesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/MsixPackage_List.json */ /** * Sample code: MSIXPackage_List. @@ -18,6 +18,6 @@ public final class MsixPackagesListSamples { */ public static void mSIXPackageList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.msixPackages().list("resourceGroup1", "hostpool1", Context.NONE); + manager.msixPackages().list("resourceGroup1", "hostpool1", 10, true, 0, Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesUpdateSamples.java index 3e619e183249..c18e2833291e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for MsixPackages Update. */ public final class MsixPackagesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/MsixPackage_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/MsixPackage_Update.json */ /** * Sample code: MSIXPackage_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java index 8792a0645ed7..3643c931a98a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/OperationDescription_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/OperationDescription_List.json */ /** * Sample code: OperationDescription_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolSamples.java index 8f2d1a9f635b..e5cd5c536470 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 @@ -9,7 +9,7 @@ /** 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. 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..3a2953178aed 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 @@ -9,7 +9,7 @@ /** 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. 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..4fd022a3c5b2 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 @@ -9,7 +9,7 @@ /** 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. 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..5b6d823de1d7 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 @@ -9,7 +9,7 @@ /** 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. 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..0428277726d2 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 @@ -9,7 +9,7 @@ /** 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 +18,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, 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..204c5f4772a9 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 @@ -9,7 +9,7 @@ /** 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. 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..ca418b29c955 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 @@ -12,7 +12,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. 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..27c6c93d717b 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 @@ -12,7 +12,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. 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..5a098cc0fe6f 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 @@ -9,7 +9,7 @@ /** 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 +18,6 @@ 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, 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..286ef48d9554 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 @@ -9,7 +9,7 @@ /** 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 +18,6 @@ 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, 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..08e378f19389 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.Context; + +/** Samples for 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", 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..79f9fa6cc917 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.Context; + +/** Samples for 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", 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..e7a30dd837bc --- /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; + +import com.azure.core.util.Context; + +/** 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, 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..df93c9cfbf19 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; +import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedule; +import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; +import com.azure.resourcemanager.desktopvirtualization.models.Time; +import java.util.Arrays; + +/** Samples for ScalingPlanPooledSchedules Update. */ +public final class ScalingPlanPooledSchedulesUpdateSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/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", 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..8b1259cd5541 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ScalingPlans Delete. */ public final class ScalingPlansDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlan_Delete.json */ /** * Sample code: ScalingPlans_Delete. @@ -18,6 +18,6 @@ public final class ScalingPlansDeleteSamples { */ public static void scalingPlansDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().deleteWithResponse("resourceGroup1", "scalingPlan1", Context.NONE); + manager.scalingPlans().deleteByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java index 915699341a74..10d2777ca5ca 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for ScalingPlans GetByResourceGroup. */ public final class ScalingPlansGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlan_Get.json */ /** * Sample code: ScalingPlans_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java index 5e122b48892c..7618caf394a5 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java @@ -9,7 +9,7 @@ /** Samples for ScalingPlans ListByHostPool. */ public final class ScalingPlansListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlan_ListByHostPool.json */ /** * Sample code: ScalingPlan_ListByHostPool. @@ -18,6 +18,6 @@ public final class ScalingPlansListByHostPoolSamples { */ public static void scalingPlanListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().listByHostPool("resourceGroup1", "hostPool1", Context.NONE); + manager.scalingPlans().listByHostPool("resourceGroup1", "hostPool1", 10, true, 0, Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java index 57249b0d430d..53d39c49525e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for ScalingPlans ListByResourceGroup. */ public final class ScalingPlansListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlan_ListByResourceGroup.json */ /** * Sample code: ScalingPlans_ListByResourceGroup. @@ -18,6 +18,6 @@ public final class ScalingPlansListByResourceGroupSamples { */ public static void scalingPlansListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().listByResourceGroup("resourceGroup1", Context.NONE); + manager.scalingPlans().listByResourceGroup("resourceGroup1", 10, true, 0, Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListSamples.java index 0a7d8c6a2fb6..8b605aa94270 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListSamples.java @@ -9,7 +9,7 @@ /** Samples for ScalingPlans List. */ public final class ScalingPlansListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlan_ListBySubscription.json */ /** * Sample code: ScalingPlans_ListBySubscription. @@ -18,6 +18,6 @@ public final class ScalingPlansListSamples { */ public static void scalingPlansListBySubscription( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.scalingPlans().list(Context.NONE); + manager.scalingPlans().list(10, true, 0, Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansUpdateSamples.java index c43ea38f28a3..4e5c3ef365cb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for ScalingPlans Update. */ public final class ScalingPlansUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/ScalingPlan_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/ScalingPlan_Update.json */ /** * Sample code: ScalingPlans_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java index 7310c89fbddc..af581e5db5a2 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for SessionHosts Delete. */ public final class SessionHostsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/SessionHost_Delete.json */ /** * Sample code: SessionHost_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java index fa9d06eb747b..90a435221883 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for SessionHosts Get. */ public final class SessionHostsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/SessionHost_Get.json */ /** * Sample code: SessionHost_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java index de47b5089a65..655078131aa8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java @@ -9,7 +9,7 @@ /** Samples for SessionHosts List. */ public final class SessionHostsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/SessionHost_List.json */ /** * Sample code: SessionHost_List. @@ -18,6 +18,6 @@ public final class SessionHostsListSamples { */ public static void sessionHostList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.sessionHosts().list("resourceGroup1", "hostPool1", Context.NONE); + manager.sessionHosts().list("resourceGroup1", "hostPool1", 10, true, 0, Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateSamples.java index d1fd474e00a1..cb1025597364 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for SessionHosts Update. */ public final class SessionHostsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/SessionHost_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/SessionHost_Update.json */ /** * Sample code: SessionHost_Update. @@ -26,7 +26,10 @@ public static void sessionHostUpdate( "hostPool1", "sessionHost1.microsoft.com", true, - new SessionHostPatch().withAllowNewSession(true).withAssignedUser("user1@microsoft.com"), + new SessionHostPatch() + .withAllowNewSession(true) + .withAssignedUser("user1@microsoft.com") + .withFriendlyName("friendly"), Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java index 997d0140aa13..38f83fafe82b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java @@ -9,7 +9,7 @@ /** Samples for StartMenuItems List. */ public final class StartMenuItemsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/StartMenuItem_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/StartMenuItem_List.json */ /** * Sample code: StartMenuItem_List. @@ -18,6 +18,6 @@ public final class StartMenuItemsListSamples { */ public static void startMenuItemList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.startMenuItems().list("resourceGroup1", "applicationGroup1", Context.NONE); + manager.startMenuItems().list("resourceGroup1", "applicationGroup1", null, null, null, Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java index 5d847efdc149..95df445dca33 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for UserSessions Delete. */ public final class UserSessionsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/UserSession_Delete.json */ /** * Sample code: UserSession_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java index 1bc422d2ee96..e67d763ec40f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java @@ -9,7 +9,7 @@ /** Samples for UserSessions Disconnect. */ public final class UserSessionsDisconnectSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_Disconnect_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/UserSession_Disconnect_Post.json */ /** * Sample code: UserSession_Disconnect_Post. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java index 0fa3fb965e88..f0ffb4c8b149 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for UserSessions Get. */ public final class UserSessionsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/UserSession_Get.json */ /** * Sample code: UserSession_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java index 85cdb2893091..ab674a1aebc9 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java @@ -9,7 +9,7 @@ /** Samples for UserSessions ListByHostPool. */ public final class UserSessionsListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/UserSession_ListByHostPool.json */ /** * Sample code: UserSession_ListByHostPool. @@ -24,6 +24,9 @@ public static void userSessionListByHostPool( "resourceGroup1", "hostPool1", "userPrincipalName eq 'user1@microsoft.com' and state eq 'active'", + 10, + true, + 0, Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java index f6fc11a416ed..6e597babc398 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java @@ -9,7 +9,7 @@ /** Samples for UserSessions List. */ public final class UserSessionsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/UserSession_List.json */ /** * Sample code: UserSession_List. @@ -18,6 +18,8 @@ public final class UserSessionsListSamples { */ public static void userSessionList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.userSessions().list("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", Context.NONE); + manager + .userSessions() + .list("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", 10, true, 0, Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageSamples.java index 5c02f0c8a62d..d4700182fa74 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageSamples.java @@ -10,7 +10,7 @@ /** Samples for UserSessions SendMessage. */ public final class UserSessionsSendMessageSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/UserSession_SendMessage_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/UserSession_SendMessage_Post.json */ /** * Sample code: UserSession_SendMessage_Post. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesCreateOrUpdateSamples.java index 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..257a02e0fb21 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Workspaces Delete. */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Workspace_Delete.json */ /** * Sample code: Workspace_Delete. @@ -18,6 +18,6 @@ public final class WorkspacesDeleteSamples { */ public static void workspaceDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.workspaces().deleteWithResponse("resourceGroup1", "workspace1", Context.NONE); + manager.workspaces().deleteByResourceGroupWithResponse("resourceGroup1", "workspace1", Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java index 32aa24ea989a..2d4f57f10d41 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for Workspaces GetByResourceGroup. */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Workspace_Get.json */ /** * Sample code: Workspace_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java index b5930e1e766e..a9773560f081 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for Workspaces ListByResourceGroup. */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Workspace_ListByResourceGroup.json */ /** * Sample code: Workspace_ListByResourceGroup. @@ -18,6 +18,6 @@ public final class WorkspacesListByResourceGroupSamples { */ public static void workspaceListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager.workspaces().listByResourceGroup("resourceGroup1", Context.NONE); + manager.workspaces().listByResourceGroup("resourceGroup1", 10, true, 0, Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListSamples.java index 640a1e9a182a..ff7389589f0e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListSamples.java @@ -9,7 +9,7 @@ /** Samples for Workspaces List. */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Workspace_ListBySubscription.json */ /** * Sample code: Workspace_ListBySubscription. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesUpdateSamples.java index 8e5f62b5b05f..4302c5d58e8d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesUpdateSamples.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.desktopvirtualization.generated; import com.azure.core.util.Context; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.Workspace; import java.util.HashMap; import java.util.Map; @@ -13,7 +12,7 @@ /** Samples for Workspaces Update. */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2021-09-03-preview/examples/Workspace_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2022-10-14-preview/examples/Workspace_Update.json */ /** * Sample code: Workspace_Update. @@ -32,7 +31,6 @@ public static void workspaceUpdate( .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) .apply(); }